Latin America’s anti-Yank forces had hoped to feast on the migration caravans’ damage to America, but it looks like Mexico is ending up paying the price. And Andres Manuel Lopez Obrador, who will be inaugurated as Mexico’s president Saturday, is the biggest loser of all.

There’s no doubt the vast majority of the 10,000-strong caravan participants are fleeing real “terror,” of some kind, back home: Extreme poverty, crime and poor governance make life in their Central American home countries utterly unbearable.

Yet the caravans were organized by cynical forces more interested in their own agendas than alleviating migrants’ pain.

In Honduras, where the first caravan originated, the organizers included loyalists of Manuel Zelaya, a one-time Cuban-allied and Venezuelan-financed president ousted after attempting to remain in power beyond his constitution-mandated term limit. Since then, Zelaya has been on a campaign to further destabilize Honduras, while traveling around the region’s socialist-leaning strongholds.

The migrants’ first trek from Honduras in early September was followed by three other caravans from Honduras, El Salvador and Guatemala. Some migrants are now at the US border.

Organizers in Central America told participants that according to UN rules, the United States must take them in. Some told Ana Quintana of the Heritage Foundation, who has traveled with the would-be migrants through Mexico, that “the UN will be there, at the border,” to sign them in, she says.

That, of course, didn’t happen. Not one flower-bearing UN official was on hand when the migrants reached America’s doorstep. President Trump, who has made immigration one of his top political issues, ordered the border shut. Thousands of would-be immigrants to the United States remain on the Mexican side of the border.

Meanwhile, Joseph Humire, an independent counterterrorism specialist who embedded himself in the caravans, positively identified a tiny minority of criminals, as well as men from Asia, Africa and the Mideast, who joined in. If these troublemakers feel cornered, he says, they could become much more violent than they’ve been so far. “It’s the wounded-dog syndrome,” he says. “Once injured, he becomes more dangerous.”

But for now, the migration hot potato is in the hands of AMLO, as the new Mexican president is known. That’s probably not what the anti-Yanks wanted or expected.

How will AMLO handle the crisis? A former mayor of Mexico City, AMLO ran for the presidency as a radical leftist twice before, finally winning it last summer. A rabble-rouser by nature, this time he steered to the center and ran as an anti-corruption reformist.

Has he truly moderated? Members of his party, MORENA, still express admiration for Cuba’s revolutionary model. Fidel Castro was a supporter throughout AMLO’s career, and his heirs in Havana, as well as communist allies around Latin America, see his victory as a decades-old dream come true.

But, again, AMLO’s inauguration is marred by the border crisis. Indeed, Mexicans already blame him for colluding with Trump — who, understandably, is widely despised in a country the American president constantly (and needlessly) disparages. No one believes AMLO when he denies striking a secret agreement with Washington to keep the caravan on Mexico’s side of the border.

But while Mexicans mostly sympathize with Central Americans who want to go to the US, they have begun to sour on the crowded makeshift tent camps set up for them in Tijuana and other border towns.

AMLO can demagogue his way out of this, rallying against Trump’s cruelty and opting for a major confrontation with America. His red companeros and pro-Mexican diehards across the region will cheer. But what about international investors who would flee Mexico at the first sign that AMLO is back to his old radical self?

There’s another way: Vice President Mike Pence will attend Saturday’s inauguration, and Secretary of State Mike Pompeo will meet Mexico’s new foreign minister Monday to negotiate a solution to the border chaos. If AMLO signals that he’s willing to work with the US to resolve this and other border issues, he may suffer a bit at home, but in the long run he will emerge as a responsible leader.

The region’s left, meanwhile, is in retreat. Top powerhouses Argentina and Brazil have voted out long-entrenched socialist leaders. Now AMLO, a career red-banner waver, will lead Mexico, but he’ll start out with a crisis that could mar his six years in power — or force him to America’s arms.

Either way, the left loses in an episode its card-carrying members thought would be a winner.

Twitter @bennyavni