MEXICO CITY (Reuters) - Donald Trump’s threat to shut the U.S. border if Mexico does not halt all illegal immigration has exposed the limitations of the new Mexican government’s strategy of trying to appease the U.S. president as he gears up for re-election.

The border fence between Mexico and the United States is pictured from Tijuana, Mexico March 29, 2019. REUTERS/Jorge Duenes

Amid a surge in migrant detentions at the southwest U.S. border, Trump on Friday said he would close the 2,000-mile (3,200-km) frontier, or sections of it, during the coming week if Mexico did not halt the flow of people.

Casting the government under leftist President Andres Manuel Lopez Obrador as the villain in his struggle to curb illegal immigration to the United States, Trump returned to a signature theme of his 2015-2016 presidential election bid.

His words were a slap in the face to Lopez Obrador, who has refused to answer back to provocative comments from Trump. Instead, the Mexican leader has worked to cement his powerbase by combating poverty with welfare handouts and lambasting his predecessors as corrupt.

On Friday, Lopez Obrador again said he would not quarrel with Trump, invoking “love and peace” and repeating his commitment to curbing migration.

However, for former Mexican foreign minister Jorge Castaneda, Mexico faces “incredibly damaging” consequences if Trump does order “go-slows” at the border, which would pitch Lopez Obrador into uncomfortable new territory.

“He’s totally unfamiliar with international affairs. He’d prefer not to have to worry about these things,” Castaneda said, noting that the U.S. president had tested many governments. “Nobody’s been able to find a way to manage Trump. It’s a mess.”

Staunchly non-interventionist in international affairs, Lopez Obrador shows little interest in diplomacy. He has often said “the best foreign policy is domestic policy.”

But as the destination of 80 percent of Mexico’s exports and workplace of hundreds of thousands of Mexicans, the United States offers Trump plenty of leverage to apply pressure via the border.

Policy experts say Trump’s demand is not realistic and that Mexican authorities are already stretched.

Still, Mexico has signaled it will redouble efforts to contain migration, which stems largely from three poor, violent Central American countries: Guatemala, Honduras and El Salvador.

Foreign Minister Marcelo Ebrard said he did not believe Trump was demanding an outright stop to the migrant flow, which has run into the millions over the past decade.

“What can be done is to improve work on registering and regulating (migration),” Ebrard told Reuters. “They’re asking us to put into effect what we said we would do.”

The government has vowed to curb migration by addressing the root causes, keeping better tabs on the people entering Mexico and adopting a more humane approach to the phenomenon.

In exchange, Lopez Obrador has sought to enlist Trump’s aid in tackling the problems of Central America, which critics say has been scarred by a history of messy U.S. interventions.

On Thursday, Lopez Obrador said migration was chiefly a matter for Washington and the troubled region, reflecting the view that Mexico cannot help being sandwiched between the struggling countries and the richest nation on the planet.

Instead, the U.S. State Department said on Saturday it was cutting off aid to El Salvador, Guatemala, and Honduras, raising questions about Trump’s commitment to helping there.

Soaring border arrests have rankled with the U.S. president.

U.S. Customs and Border Patrol projections are for over 90,000 apprehensions to be logged during March, according to data provided to the Mexican government. That is up more than 140 percent from March 2018, and a seven-fold jump from 2017. (Graphic: tmsnrt.rs/2V59n2R)

At the same time, Lopez Obrador is sending fewer migrants back home. In December-February, the administration’s first three months, the number dropped 17 percent from a year earlier to 19,360, data from the National Migration Institute show.

The fall partly reflects the government’s decision to issue humanitarian visas to encourage Central Americans to stay in Mexico. The visas proved so popular that the government had to suspend them, officials say.

Meanwhile, Lopez Obrador’s savings drive to pay for his social programs has cut the budget of the National Migration Institute by more than a fifth this year.

‘LIFE AND DEATH’

The clash illustrates Lopez Obrador’s miscalculation in thinking he could contain Trump’s hostility toward Mexico with U.S. presidential elections in 2020, said Agustin Barrios Gomez, a member of the Mexican Council on Foreign Relations.

Tension was inevitable given that Trump’s tough stance on illegal immigration is “immediately antagonistic” to Lopez Obrador’s core constituency: poorer Mexicans who often seek to better their lot in the United States, he argued.

Yet by agreeing in December to accept Central American asylum seekers while their claims are processed in the United States, Lopez Obrador gave the impression he could be “pushed around” by Trump, said former foreign minister Castaneda, who backed Lopez Obrador’s closest rival in the last election.

To keep the border open, Mexican business leaders say they are leaning on U.S. partners to pressure Congress.

A shutdown would be “very negative for both countries,” said deputy Mexican economy minister Luz Maria de la Mora, who saw Trump’s comments as part of his election campaign.

“I think the U.S. administration and the advisers in the White House know it’s not a good idea,” she told Reuters.

But if push came to shove, Mexico would suffer most, said Castaneda.

“The Americans have a much greater capacity ... to outlast the Mexicans,” he said. “For Mexicans it’s a life or death issue. For Americans it’s a pain in the ass, but that’s it.”