President Obama has a mixed record on immigration. On one hand, he is the most stringent enforcer of immigration laws in American history — far outstripping the deportation numbers of the George W. Bush and earlier administrations. On the other hand, his executive actions have helped shield large swaths of illegal immigrants from deportation.

The Obama administration has deported 2.5 million illegal immigrants. This record‐​setting pace of deportations holds up even when counting only those from the interior of the United States — 1.18 million of them under Obama’s watch. By contrast, the Bush administration deported 2 million people and a confirmed 555,164 from the interior of the United States. Interior deportation numbers for the first two years of the Bush administration aren’t available but under any realistic assumption his numbers could not possibly exceed Obama’s.

The chance that an illegal immigrant will be deported under the Obama administration is an average of 1.48 a year compared to 0.83 percent under the Bush administration. The Obama administration has surged enforcement immigration laws against employers — issuing 15.5 times as many fines against employers and 8.3 times as many arrests for violating immigration laws as his predecessor. Detention for those who crossed the border has also increased under the Obama administration — including for many of the roughly 227,000 children and families who have surged across the border since 2010.

And this is all on the heels of expanding a small Bush‐​era interior enforcement program called Secure Communities (S‑COMM) from just a handful of jurisdictions to virtually the entire country. S‑COMM forced local police departments to cooperate with the federal government in removing illegal immigrants they arrested. S‑COMM’s purpose was to remove dangerous criminals but it had zero effect on actual crime rates according to research published in the prestigious Journal of Law and Economics and the journal of Criminology and Public Policy. In 2015, the Obama administration replaced S‑COMM with a more targeted program whereby the government primarily goes after serious offenders.

There is just no two ways about it, President Obama initiated and expanded a harsher immigration enforcement regime than President Bush or any other President in American history.

There is, however, another side to that story. President Obama issued a de facto temporary legalization of some illegal immigrants who were brought here as children. His first Deferred Action for Childhood Arrival (DACA) has the potential to shield about 1.7 million illegal immigrants from deportation although substantially fewer have applied for that protection. His expanded 2014 DACA announcement combined with Deferred Action for Parents of Americans has the potential to shield many more although the courts have held up its implementation due to serious Constitutional questions.

On the legal immigration front, President Obama’s administration first promulgated rules to increase the cost for temporary guest worker, guaranteeing increased demand for illegal workers to fill those gaps. However, in recent years agencies under his watch have slightly liberalized rules that allow skilled workers and their families to more easily seek and gain employment in the United States.

Throughout this time, the number of illegal immigrants has held steady. In 2014 the number of illegal immigrants was 11.3 million according to the Pew Research Center — the same number as were estimated to be here when he took office. By contrast, the population of illegal immigrants grew by almost two million under the Bush administration following rapid growth in every previous administration going back to Johnson. The collapse in illegal immigrants entering the United States explains much of the stabilization but perhaps President Obama doesn’t deserve any credit for that.

Douglas Massey of Princeton University attributes roughly zero credit to changing immigration enforcement. He claims that more border security actually “locked in” illegal immigrants by restricting their cross‐​border movement. Since the workers could not move back and forth due to the new border patrol, they sent for their families to come north. Massey estimates that there would be 5.3 million fewer illegal immigrants in the United States if immigration enforcement had not expanded since 1986.

In contrast, a report published by the Council on Foreign Relations claims that about a third of the decrease in illegal immigrants coming across the border can be explained by increased enforcement. The rest is explained by changing economic conditions, namely that the Mexican economy has improved relative to the U.S. economy. Immigration enforcement may be up but it has not affected the flow or population of illegal immigrants as much as other factors like the economy or demographics.

President Obama has a mixed immigration legacy. His executive actions have shielded hundreds of thousands from deportation and have the potential to do much more. On the other hand, he was a stringent enforcer of immigration laws and expanded their reach. President Obama did not enforce immigration perfectly – he just did so far more thoroughly than any other administration in U.S. history.

The lesson of this mixed legacy is that immigration enforcement cannot solve the illegal immigration problem and executive actions to legalize them are just a temporary and partial solution. Only Congress can put forth serious and permanent immigration reform that expands legal immigration and legalizes the current illegal immigrant population as a lasting solution to the current broken system.