MEXICO CITY — The new president of Mexico, Andrés Manuel López Obrador, has built his entire political career on defending the poor.
Now, days before he takes office, President Trump is testing how firmly he will live up to that.
Thousands of migrants from Central America have amassed along the border of Mexico and the United States — with thousands more on the way. US Border Patrol agents fired tear gas at them Sunday to prevent hundreds from reaching the border.
Trump has vowed to keep the migrants on Mexican soil while they apply for asylum in the United States, a process that could squeeze them into squalid, overcrowded shelters for months, possibly years. Mexican officials say the strain is causing a humanitarian emergency, creating a political crisis for López Obrador before he takes office.
“Mexico should move the flag waving Migrants, many of whom are stone cold criminals, back to their countries,’’ Trump wrote on Twitter on Monday. “Do it by plane, do it by bus, do it anyway you want, but they are NOT coming into the U.S.A. We will close the Border permanently if need be. Congress, fund the WALL!’’
After more than 15 years of campaigning as a leftist firebrand, López Obrador must swiftly decide: Will he stand up to Trump and defend the migrants’ pleas to be allowed into the United States, even if many of their asylum requests will ultimately be rejected? Or will he acquiesce to Trump’s demands and the economic imperative of good relations with the United States?
“The Mexican government is in a dead-end alley,’’ said Raúl Benítez Manaut, a professor of international relations at the National Autonomous University of Mexico. “López Obrador is facing a baptism of fire, and a dilemma of whether he should maintain his promises of humanitarian policies, or stop the masses of migrants trying to reach the US.’’
Members of the new Mexican administration, which takes office Saturday, view the situation with alarm. Top Cabinet ministers had been preparing Sunday to discuss what to do about the standoff with the United States — and their own country’s growing frustration with thousands of poor migrants streaming in from Central America — when their agenda got hijacked by the fracas at the border.
Suddenly, the incoming ministers found themselves watching videos of hundreds of migrants, including small children, rushing toward the border gates and getting tear-gassed by US border agents.
López Obrador, who has promised jobs and visas to migrants traveling north, has to square his lofty campaign promises with some nettlesome international realities — as the world watches.
The question is: Which version of López Obrador will be facing off against Trump?
Unpredictable. Temperamental. Beloved by his base and loathed by his detractors.
López Obrador has been compared to Trump.
And as is often the case with the US president, even his closest aides say they are not sure which López Obrador will emerge: the avuncular leader who preaches love and morality, the leftist firebrand who skewers opponents, the pragmatist aiming for a broader development deal for the region — or the impetuous politician who seems to make it up as he goes along.
For now, the new administration is being careful not to paint itself into a corner, citing the fact it has yet to take office.
“We have little margin right now because we don’t have our own operation,’’ said Marcelo Ebrard, the incoming foreign minister. “Right now, we are just spectators.’’
The fracas at the border underscored the fragility of the situation. As more migrants from Central America gather — with as many as 10,000 expected to reach Tijuana in the coming weeks — the urgency to manage the chaos grows by the day.
Top officials in López Obrador’s new government fear that images of migrants trying to force their way into the United States will heighten the anti-immigrant sentiment that Trump has channeled so effectively in the US. That could make it even harder to strike a resolution that involves compromise.
And while López Obrador has promised humane treatment for migrants passing through or staying in Mexico, it is unclear what his country will get for housing tens of thousands of migrants as they await asylum decisions from backlogged US courts.
For his part, Trump remained defiant Monday.
‘‘They were being rushed by some very tough people and they used tear gas,’’ Trump said, defending the actions of the border officers. ‘‘Here’s the bottom line: Nobody is coming into our country unless they come in legally.’’
At a round table in Mississippi later Monday, Trump seemed to acknowledge that children were affected, asking, ‘‘Why is a parent running up into an area where they know the tear gas is forming and it’s going to be formed and they were running up with a child?’’
He also claimed that some of the women are not really parents but are instead ‘‘grabbers’’ who steal children so they have a better chance of being granted asylum in the United States.
Material from the Associated Press was used in this report.