Thelma Aldana in Guatemala City in April 2018. (Moises Castillo/AP)

IN THE recent crush of Central American asylum seekers pouring over the United States’ southern border, no country has been the source of more migrants than Guatemala, where poverty and misrule are aggravated by stunningly pervasive corruption. That would suggest the Trump administration, in its crusade to deter migration, would intensify efforts to fight graft and impunity there. In fact, it is doing the opposite.

For a decade before President Trump entered office, the United States provided critical diplomatic and financial backing to an extraordinarily effective anticorruption commission that prosecuted hundreds of Guatemalan lawmakers, officials and others involved in dozens of criminal schemes and networks. The International Commission against Impunity in Guatemala, supervised by the United Nations, had a key strategic ally in Thelma Aldana, an anticorruption crusader who, as the nation’s attorney general from 2014 to 2018, launched a devastating frontal assault against entrenched elites who had enriched themselves for decades without consequence; she sent some 250 to jail. Among those she accused were a former president, Otto Pérez Molina, who resigned in disgrace, and the current president, Jimmy Morales, who has denied wrongdoing.

The campaign to clean up Guatemala earned the commission and Ms. Aldana powerful enemies who feared not just prison time but an end to long-standing business as usual — kickbacks, payoffs and sweetheart deals for the well-connected. Those enemies were kept at bay with the help of friendly judges and diplomatic cover. Then Mr. Trump took office.

Over the objections of career diplomats, political appointees from the Trump administration sided with Guatemalan corporate and political figures who argued, preposterously, that the anticorruption commission was an affront to the nation’s sovereignty. (In fact, many of its investigators are Guatemalan and it enjoys broad popular support.) When Mr. Morales announced last summer that the commission would be abolished in a year, Washington barely objected.

That set the stage for a counterattack targeting Ms. Aldana, who was disqualified as a candidate in Guatemala’s presidential elections this spring when an array of charges — some flimsy, others spurious — were brought against her. Not coincidentally, she was the only leading candidate who had given full-throated backing to the anticorruption commission.

Now, the commission appears doomed, and with it the country’s hopes of rolling back rampant graft. Ms. Aldana, facing death threats at home, has fled to the United States, where she applied for asylum this month. And Mr. Morales, emboldened, is reportedly negotiating a “safe third country” pact that would force Salvadoran and Honduran migrants, who transit Guatemala on their way north, to seek asylum there instead of the United States — a move that would put them at risk given Guatemala’s poor human rights record.

In Guatemala, rumors are rife that Ms. Aldana might be arrested by U.S. immigration agents and deported back to her home country. That would be a grave mistake. Three years ago, when she was honored with the State Department’s annual International Women of Courage award, then-Secretary of State John F. Kerry lauded her as “fearless” in prosecuting corruption and pushing reforms. She, like efforts to establish the rule of law in Guatemala, needs and deserves the United States’ protection and support.