Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.

(Marco Ugarte/AP)

The United States and Mexico are squaring off in a tense showdown entirely of President Trump’s making. Following a tweeted announcement from the president, the Trump administration is readying a 5 percent tariff on $350 billion worth of Mexican goods imported into the United States. Trump threatened the punitive measure as a result of Mexico’s supposed inability to thwart flows of migrants making their way north. U.S. and Mexican officials met in Washington this week to hash out a deal that would dispel the possibility of a new trade war. At the time of writing, there was cautious optimism that the impasse could be breached.

On Thursday, my colleagues reported on details of a potential agreement. Mexico would pledge to deploy up to 6,000 national guard troops along its border with Guatemala, as well as expand its immigration detention and enforcement capabilities. The Trump administration is also pushing to revamp asylum procedures, placing more of the burden of hosting migrants from the poverty-racked countries of the Northern Triangle — Guatemala, Honduras and El Salvador — on Mexico itself.

Under a putative plan, the United States would swiftly deport Guatemalan asylum seekers who set foot on U.S. soil to Mexico and would send Honduran and Salvadoran asylum applicants to Guatemala, reported my colleagues, who were briefed by U.S. officials. The officials added that the screening standard for asylum applicants would be far tougher, making rejections more likely.

The White House’s alarm over the current state of affairs is understandable. Government statistics point to a record surge of Central American migrants crossing the U.S.-Mexican border. On Wednesday, U.S. Customs and Border Protection reported that more than 144,000 people were taken into custody in May, a 32 percent jump from April. “It was by far the largest one-month arrest total since President Trump took office, and it was the highest monthly figure in 13 years,” my colleagues reported. CBP said it has detained some 680,000 border-crossers in the past eight months, a figure larger than the population of the city of Miami.

For Trump, the threat of import duties is a blunt instrument to achieve what he wants to see along the U.S. border. His administration is pushing Mexico to commit to reducing the number of migrants crossing over to the United States to the historically low levels seen around the time Trump first took office. But that’s no simple feat.

“Mexico has stepped up immigration enforcement dramatically in recent weeks — apprehending more than 22,000 unauthorized migrants in May, the highest monthly number in its history,” reported The Post’s Mary Beth Sheridan. She added that a lack of funding and resources impedes patrolling Mexico’s southern border, which meanders through jungle and mountains, while the country’s bureaucratic institutions tasked with dealing with migration are overwhelmed.

“Mexican border towns are ill-equipped for handling transient immigrant populations, let alone managing long-term settlements,” wrote Slate columnist León Krauze. “Mexico also faces other, more systemic challenges. The fight against smugglers who squeeze immigrants out of their last cent is an uphill battle, and it would be even more so if [President Andrés Manuel] López Obrador ends up scrapping the Mérida Initiative, the bilateral agreement that has strengthened cooperation on intelligence and security over the last 12 years.”

Mexican officials have been stung by the White House’s bullying but are desperately trying to stave off the tariffs, which could have devastating effects on both sides of the border. On Saturday, López Obrador will hold a rally along the U.S. border, championing unity and upholding “Mexican dignity.”

“We believe our countries can reach a deal on how to face a matter on which our approaches are different,” Mexican Foreign Minister Marcelo Ebrard told reporters earlier this week. But “there is a clear limit to what we can negotiate and that is our Mexican dignity.” Ebrard also suggested that a weakened Mexican economy would only make it more difficult to stem the flows of Central American migrants.

And closed borders won’t solve what is a regional problem. Absent from Trump’s grandstanding is any real recognition of what’s fomenting a generational crisis in the Northern Triangle, where corrupt governance, impoverished economies, climate catastrophe and terrifying criminal violence all drive migrants north.

In meetings with U.S. counterparts, Mexican officials even suggested that the United States could make a significant impact just by “investing $10 million for irrigation equipment in rural Honduras,” according to my colleagues.

Instead, this year Trump moved to cut aid to these three governments, rather than extending additional support.

More sober-minded policymakers argue that, rather than throwing up walls and launching ruinous trade wars, more effective remedies would involve not just economic aid but also political pressure that strengthens the rule of law. (In Guatemala, though, the Trump administration has undermined a prominent independent anti-corruption agency; in Honduras, it backed a sitting president whose associates are now implicated in a string of drug-trafficking and money-laundering charges.)

In a column last year for The Post, George P. Shultz, a former U.S. secretary of state, and Pedro Aspe, a former Mexican treasury secretary, also pointed to American culpability in all this. “Curbing violence in Central America will require addressing the U.S. war on drugs,” the two former officials wrote. “The supply-side approach’s failure can be seen in the fact that the United States has the highest use of cocaine among major economies. The United States should instead focus more on reducing the demand for illegal drugs.”

Similarly, for all Trump’s hectoring about the potential violence and criminality that flows north into the United States, he blithely ignores the long-standing impact of U.S. weaponry flowing south. Cartels across the region benefit from lax American gun laws. “A study of weapons found at crime scenes suggests that 70 percent of gun crimes in Mexico involve American-bought weapons,” noted a recent story in the Economist.

None of this features in Trump’s political rhetoric, of course. If an accord with Mexico can’t be reached, he’ll probably rail once more about the menace to the south. But the imposition of tariffs may pose a problem for Trump far closer to home: a rebellion from within his own party.

Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.