MEXICO CITY — President Andrés Manuel López Obrador of Mexico has two options in confronting the migration standoff with Washington: He can bow to President Trump’s demands, and take in tens of thousands of new asylum seekers. Or he can refuse, and face the threat of tariffs on all Mexican imports to the United States.

Both would strain his nation’s economy and weaken his standing at home.

This awkward balancing act is evident even in Mr. López Obrador’s public approach to the crisis. Trapped between competing pressures, he is calling on Mexicans to rally in the border city of Tijuana this Saturday to both defend the dignity of Mexico and, at the same time, celebrate their friendship with the United States.

The stalemate in negotiations between the two nations over what Mexico can do to halt migration through its territory — and Mr. Trump’s looming ultimatum to impose tariffs on all Mexican imports if they fail — comes at a bad time for Mr. López Obrador.

[Update: Trump says U.S. has reached deal with Mexico and calls off tariffs.]

The Mexican economy is anemic and slowing. The credit agency Fitch Ratings has downgraded Mexico’s sovereign debt, citing its ailing oil company. Its currency has weakened. And its most important trade relationship — a rare bright spot in an otherwise bleak landscape — is in the cross hairs for something that has nothing to do with trade.