Alejandro Giammattei in Guatemala City on Tuesday. (Jose Cabezas/Reuters)

ONLY ABOUT 40 percent of Guatemala’s more than 8 million registered voters cast ballots in the Central American country’s national election on Sunday. If low turnout for only the sixth vote since the country’s civil war reached a negotiated end in 1996 reflected disenchantment with democracy, those feelings were all too understandable. Two of three top contenders to succeed populist incumbent President Jimmy Morales were disqualified from running under dubious circumstances in the weeks preceding the voting — most notably, former attorney general Thelma Aldana, who helped send 250 corrupt officials and others to prison. One of the powerful enemies she earned through her efforts was Mr. Morales. She felt obliged by death threats to flee to the United States earlier this summer.

The winner on Sunday, Alejandro Giammattei, is a former national prisons director ideologically similar to Mr. Morales, who has pledged to rekindle economic growth and fight corruption. In Guatemala, these are the usual campaign promises. In Mr. Giammattei’s case, they warrant more than the usual skepticism. He supports Mr. Morales’s decision to shut down a U.N.-backed commission that helped prosecute public corruption cases. Indeed, Mr. Giammattei was himself a target of the commission, for alleged culpability in the killing of seven prison inmates by forces under his authority. (The courts acquitted him.)

The rule of law, or lack thereof, is a major reason for the immediate crisis Guatemala faces, and which Mr. Giammattei will probably inherit when he takes office in January: a massive exodus to the United States. All the more reason to lament the Trump administration’s acquiescence in Mr. Morales’s de facto abolition of the U.N.-backed anticorruption effort, not to mention Ms. Aldana’s treatment. President Trump sees the migration crisis strictly as a problem of keeping Central Americans out of the United States, which he proposes to do, in part, by coercing the Guatemalan government. Hence the agreement, struck with Mr. Morales under threat of tariffs and other economic punishment, by which Guatemala would be made responsible for granting asylum to Hondurans and Salvadorans, rather than letting them pass on to Mexico as at present.

The deal, whose precise legal status remains unclear because of adverse Guatemalan court rulings, is unpopular in Guatemala. Many fear it would overwhelm the country with migrants that it is ill-equipped to house and feed. Bowing to public opinion, Mr. Giammattei promised in vague terms to revise it, but given his country’s dependence on the U.S. market, it’s not clear what he can do if Mr. Trump insists.

Mr. Giammattei is on sounder footing when he calls — albeit inartfully — for an “economic wall,” consisting of greater economic opportunity, that would stop so many of his country’s people from seeking a new start elsewhere. If the Trump administration is smart — a big “if,” to be sure — it will not cut well-designed economic aid to Guatemala but increase it, to help the president-elect meet his legitimate development goals. However, only legal and political reform can provide long-term cures to the official corruption and violent street crime that plague Guatemala. Unless and until the presidents in Guatemala City and Washington effectively address the underlying issues, people will keep trying to leave.