A reversal of the flood of illegal immigrants and drugs across the southern US border seems beyond reach.

A missing piece of the puzzle, however, has flown under the radar.

The Obama administration exacerbated these problems by favoring collectivists in Latin America, most notably dictator Raúl Castro of Cuba.

Under the cover of foreign aid and the UN-created CICIG commission, Obama’s presence came to bear in Guatemala. As the geopolitical center of illegal immigration and drugs for the United States, a lawless Guatemala guarantees a steady flow. Mexico shares a 595-mile border and has proved incapable of resistance.

As US Customs and Border Protection has documented, Central Americans outnumber Mexicans crossing the border illegally. During the Obama tenure, the number of unaccompanied children arriving from the Northern Triangle — Guatemala, El Salvador, and Honduras — ballooned from 3,304 in 2009 to 46,893 in 2016.

The UN high commissioner for refugees says the five-fold increase in Northern Triangle asylum seekers since 2008 is “a staggering indicator of the surging violence shaking the region.”

The problem, according to Admiral Kurt Tidd of the US Southern Command, “is a very big one indeed.” He identifies the destabilizing and corruptive influence of “transnational threat networks,” including from the Middle East, which work with local gangs to reach the United States.

The same pattern holds for narcotics, with up to 94 percent of smuggled heroin coming via Mexico. It isn’t Mexican heroin, though, since their military has almost completely wiped out the crop. Instead, narcos use rural Guatemala to grow poppies and transport heroin, particularly from Colombia.

These rural areas are lawless and dominated by gangs descended from the Castro-trained Marxist guerrillas of Guatemala’s armed conflict (1960-1996) — thanks to protection from their allies that Obama imposed on the government. Obama’s radical brethren control Guatemala’s judiciary and criminal prosecution via the CICIG.

These gangs force inhabitants into their criminal agenda. Under duress, the indigenous victims block police from enforcing the law and destroy businesses that would create wealth and opportunity.

The interior minister, in his position thanks to Obama’s ambassador, directs police to engage in “dialogue” with guerrilla successors, as they commit flagrant crimes. In their rare occurrence, police fail to execute arrest warrants on well-connected targets.

If cases do get to court, judges face intimidation to release defendants regardless of evidence and law. Infiltrated higher courts also overturn any decision against the gangs that dominate the rural areas.

The US ambassador has been an accomplice, and he has sought to silence those who speak out. He calls opponents corrupt and threatens criminal prosecution, and he has cancelled their US visas.

The ambassador’s threats extend to Guatemala’s highest court. A member of the Congress, for example, reports that magistrates fear investigations and visa problems if they rule against the ambassador’s wishes. This leads to illegal rulings against businesses and political enemies in favor of radicals.

Unfortunately, the State Department has echoed the propaganda of the guerrilla successors in Guatemala. In their 2016 human-rights report, for example, they covered for those obstructing regional development projects.

This follows the ideological pattern that just led the State Department to blame Israel for inciting Palestinian terrorism. Likewise, as anti-freedom UN officials go after Israel, the CICIG goes after Guatemala.

With no oversight, the CICIG refuses to prosecute the collectivist gangs. Yet it has allies in the US Congress and runs on US taxpayer dollars. At the July 19 hearings to confirm the new ambassador to Guatemala, Senator Robert Menendez (D-NJ) said the CICIG “has not only been successful in addressing impunity in Guatemala but also serves as a model for other countries in the region.” He joins George Soros’s Open Society, which claims that the “CICIG now stands as a potent potential model.”

Yes, a model to impose radical collectivists on friendly countries trying to be free.

After suffering under the Obama-protected guerrilla successors, Guatemala’s rural population is hungry for liberation and economic opportunity. Economic elites, victims of Obama’s allies’ arbitrary application of law, would also readily support the rule of law.

A tactic to cover for Obama’s lawlessness in Guatemala has been to tout counter-narcotics cooperation and inflated statistics that imply progress in the fight against organized crime. Meanwhile, the guerrilla successors increase the flow of illegal immigrants and narcotics.

Last week Attorney General Jeff Sessions was in El Salvador seeking to combat the harm done by the MS-13 gang. However, the Trump administration’s efforts will fail unless they address the Guatemalan gateway.

Applying the law in rural Guatemala would significantly reduce the flow of illegals and narcotics prior to reaching Mexico, where corrupt officials provide easy passage. The Trump administration must, therefore, reverse the Obama policy and genuinely help bring the rule of law, which won’t happen through the UN-created commission.

Steve Hecht is editor at large of the Impunity Observer and writes from Guatemala, where he has resided for more than four decades.