There has been a surge in Central American immigrants heading for the United States since Donald Trump won the Election in November, according to several initial reports, They mainly start out from the Northern Triangle of Guatemala, Honduras and El Salvador on their expensive and treacherous journey to the United States.

Not only unaccompanied minors are making the trip but their entire families, or at the very least, women who travel with the minors, the reports state. Presumably more people are reaching Mexico and then the United States, where they are quickly apprehended, taken to detention centers processed for their probable deportation.

If this is the case, it is only logical. Trump has vowed to build his wall. It does not matter if Mexico will pay for it or even if the threat is true. It makes perfect sense for anybody hoping to make it to the United States, from Salvador, Honduras or Guatemala, to do so before any wall is put up.

Violence in these countries continues unabated. The Obama administration’s already meager funding of the Alliance for Prosperity, which serves to reduce violence in these countries, may be significantly reduced or cut altogether. Therefore, it is no surprise that people living in fear in their own countries choose to emigrate.

If they have relatives in the United States, or if they think that their reception will be better with President Barack Obama still in power until January 20, then their decision is perfectly rational.

When the first wave of unaccompanied minors came to the United States in July 2014, Mexico complied with the White House request to cooperate in stopping the flow of immigrants.

The logic behind it was sound. The goal was to avoid sparking anti-immigrant hysteria in the United States precisely when immigration reform seemed set to prosper. The House of Representatives looked like it would pass a bill already approved in the Senate.

Obama too appeared capable of issuing an executive decree to legalize millions of undocumented immigrants. In that context, Mexican President Enrique Pena Nieto declined to take either of the two feasible actions for a country caught up in this immigration situation.

Pena Nieto had the option of categorizing people fleeing the Northern Triangle as refugees by determining that Mexico viewed these immigrants as escaping a very real fear for their lives, goods, communities, etc. Under this policy, such immigrants are not deported, but rather protected in refugee camps under the supervision of the UN Refugee Agency. After a month, or more, just as with Cuban refugees, they have the right to leave Mexico for wherever they choose: to the United States, or their home country.

Pena Nieto’s other option was to follow Turkey’s example. When German Chancellor Angela Merkel asked President Tayyip Erdogan to stop the flow of Syrians and Afghan entering the European Union he agreed -- but set the following conditions. The reopening of talks with the European Union on Turkey becoming a member; the elimination of the visa requirement for Turks travelling to Europe; 6 million Euros a year to pay for refugee costs in Turkey; a one-for-one program where the EU would accept a Turkish immigrant for every Syrian or Afghan accepted by Turkey.

Turkey has not won everything it wanted in its deal with the EU. But Mexico has agreed to do the United States’ dirty work without maintaining its values via the refugee option and without extracting any benefits from a Turkey-style alternative. But things have now changed.

Obama was a good friend to Mexico but did not accomplish as much as he could have. He took too long in achieving immigration reform, and in many other aspects -- including, maybe, the war on drugs -- he largely adopted his predecessor’s policies.

But Trump is no friend to Mexico. It makes no sense for Mexico to keep doing America’s dirty work with Trump as president if he wants to build walls, deport Mexicans or revise the NAFTA trade deal. Still, Mexico has a bargaining chip. Mexico can stop the flow of immigrants on the southern border, or it can allow immigrants free access to its northern border.