Former Honduran presidential candidate Salvador Nasralla marches in a protest against election results in Tegucigalpa, Honduras, on Jan. 12. (Tomas Ayuso/Bloomberg)

AS IN much of the rest of the world, democracy is on the defensive in Latin America, in part because it has few principled defenders. A simple comparison of two ongoing political crises, in Venezuela and Honduras, illustrates the problem. After Venezuela's populist anti-American government rigged state gubernatorial elections in October, the United States led a campaign of condemnation and stepped up sanctions. But when Honduras's rightist pro-American president suspiciously reversed what looked like an upset loss in a presidential election a month later, the Trump administration congratulated him.

It was not alone in its hypocrisy; a number of Latin American countries have been critical of Honduras while ignoring the abuses in Venezuela. But as the hemisphere's oldest and largest democracy, the United States has an obligation to stand up for free and fair elections even when it is not convenient. Not only did it not do so in Honduras, but it also undercut an effort by the Organization of American States (OAS) to document and correct the problems with the vote.

The trouble in the impoverished Central American state began when authorities announced surprising initial results from a Nov. 26 presidential contest: Incumbent Juan Orlando Hernández was trailing challenger Salvador Nasralla with more than half of the vote counted. An upset seemed in the making that would oust Mr. Hernández, who has cooperated with U.S. efforts to control drug trafficking and migrant flows from Honduras. The apparent victor was a television personality backed by a former leftist president.

Then the vote count slowed to a crawl. When electoral authorities next issued a report, 36 hours later, Mr. Hernández was back in contention. He was eventually proclaimed the winner by a margin of about 1.5  percentage points.

Mr. Nasralla's supporters cried foul, and protests erupted around the country in which more than 30 persons were killed. At the same time, an OAS delegation sent to monitor the election reported significant irregularities. OAS Secretary General Luis Almagro said on Dec. 17 that the organization could not vouch for the outcome of the election and urged a new vote.

Rather than get behind that demand, the State Department issued a statement on Dec. 22, the Friday before Christmas, congratulating Mr. Hernández. The announcement noted the reports of irregularities and called for "a significant long-term effort to heal the political divide in the country and enact much-needed electoral reforms." But the practical effect was to confirm Mr. Hernández's control over a government that depends on hundreds of millions of dollars in U.S. aid.

The badly flawed process could deepen instability in the country; if so, more Honduran migrants will head for the United States. Meanwhile, the chances that independent monitors from the OAS will be able to check abuses in the 18 elections scheduled in the Western Hemisphere this year have been damaged. If an anti-American candidate is proclaimed the winner in some other Latin nation, and other governments refuse to respect evidence of irregularities, the Trump administration will have only itself to blame.