Editor's note: Shortly after the publication of this article, President Trump announced that he would not immediately withdraw the US from NAFTA, but he will withdraw pending negotiations "if we do not reach a fair deal for all."

President Trump is likely to begin the process for the United States to exit the North American Free Trade Agreement, a trade pact between Canada, the US, and Mexico, according to senior sources. Trade between the three countries, adjusted for inflation, has increased from $290 in 1993 when NAFTA was adopted to $1.1 trillion in 2016.

Although America exiting NAFTA would be a marked shift away from standing US foreign policy, it is not a very surprising move for Trump. He campaigned heavily against foreign trade, especially with China and Mexico, and frequently promised to leave or renegotiate NAFTA. And although his recent shifts on Syria and Yemen indicate that Trump's defense policy is beginning to more resemble that of a normal US president, the same progress cannot be seen on trade. In his first week in office, Trump formally killed the TPP, and he has recently been especially vocal about imposing tariffs against Canadian lumber. All of this shows that restricting trade is one of Trump's most important policy goals.

But there's one goal that's definitely more important to Trump and his base: decreasing illegal immigration. And with Trump possibly picking his biggest trade fight yet, he may end up weakening his hand on immigration. If Trump ends NAFTA by pulling America out, he might only increase the illegal immigration he so passionately wants to stop.

To understand this connection, we need to recognize a fundamental truth about illegal immigration and all migration generally. When Mexicans illegally enter the United States, it is not a case of Mexico "sending its people" as Trump so infamously stated two years ago. Rather than Mexico sending its people, the United States is pulling them in.

This is to say, quite obviously, illegal immigration is little more than a matter of incentives. People who illegally enter the United States do so because life in America is that much better than life in their home country, be it in terms of economics, crime, or whatever else. This is why net immigration from Mexico fell to zero and below (that is, more people going to Mexico than vice versa) during the height of the recession.

Leaving NAFTA would affect this situation by throwing a wrench into the US-Mexican economic relationship. Despite much fanfare and popular resentment, NAFTA has surely benefited the Mexican economy. (It’s good for America too, but that’s a different story.) Indeed, in terms of “welfare” (a term economists use to mean an economy’s overall wellbeing), Mexico was the largest beneficiary of NAFTA. Despite Mexico’s highly unstable economy, NAFTA contributed to rising real wages and greatly improved productivity. The World Bank estimates that foreign direct investment in Mexico would be 40% lower without NAFTA. And after the 1994-95 Peso crisis raised the spiked the poverty rate, Mexico has seen a steady drop in poverty, decreasing by thirty percentage points between 1996 and 2006.

Source: Congressional Research Service

Now, I should be clear: NAFTA is not enough to fully address Mexico’s underlying economic problems. Poor governance, educational inequality, and drug violence all dramatically suppress Mexico’s progress, which is why we haven’t seen as wonderful a performance out of NAFTA as its creators promised. But perhaps no other action would be as harmful to Mexico than restricting trade and investment from America. Exports to the US constitute 27% of Mexico’s GDP, thirty times greater than the next largest partner.

Remember that immigration from Mexico turned negative during the recession. As it happens, it has stayed that way ever since, even though the American economy has so greatly improved. That speaks to the emerging economic strength of Mexico.

But if Trump kills NAFTA, he will remove Mexico’s strongest support. All of the investment going into Mexico and the products sold from Mexico would then have to jump through extra hoops of tariffs and quotas. Not everything will make it, and Mexico will suffer as a result. America will be hurt as well, but not as much as our southern neighbor. Our economy is stronger, and we have more partners to lean on in the event of losing the one. Such a situation would recreate the conditions that spurred illegal immigration from Mexico in the first place: the promise of a much more prosperous America in the face of a sinking Mexico, an incentive so strong no wall could stop it.

Trump may have been the anti-trade candidate. He was also the deregulation candidate and the anti-interventionist candidate. But above all else, Trump promised to halt illegal immigration. He simply cannot keep hold of that mantle if he ends NAFTA and reopens the gates of illegal immigration from Mexico.

Photo credit Voice of America, public domain