Two days before U.S. voters flocked to the polls, Nicaragua held its own elections. But the results there surprised no one.

For the fourth time, leftist strongman Daniel Ortega was re-elected president. Back in the 1980s, he led the Marxist Sandinista National Liberation Front (FSLN) during Nicaragua’s bloody civil war. And his victory in this latest sham election ensures that Nicaragua will remain an authoritarian regime allied with every enemy of the U.S. from Caracas to Moscow.

And let there be no doubt: The elections were nothing short of fraudulent.

The systematic fraud was a culmination of months of work. In June, the FSLN-dominated Supreme Court removed Ortega’s would-be challenger from his leadership role in the opposition party. He then expelled 28 opposition congressmen from the National Assembly. Friendly courts backed this illegitimate process.

Then there is Ortega’s treatment of Americans prior to the elections. In June, he expelled three U.S. government officials without substantive explanation. This isn’t the first time Nicaragua has banished Americans.

In 2014, Ortega barred Sen. Marco Rubio, R-Fla., and Rep. Ileana Ros-Lehtinen, R-Fla., from entering the country. It was his way of punishing them for supporting sanctions on human rights abusers in the Venezuelan government.

It should also be clear that this is not Ortega’s first attempt at undermining Nicaragua elections.

He has been changing electoral rules and hijacking Nicaragua’s fragile institutions for years. One of his rule changes lowered the threshold of votes needed to win to 35 percent. He also successfully pushed a constitutional amendment removing presidential term limits. Meanwhile, his party and family control virtually all levers of power within the country.

For the United States, the implications are serious.

Given his radical guerrilla roots, Ortega has long been an ally of anti-American regimes. Chief among them is the Venezuelan regime.

Before criminality and the failures of socialism destroyed the Venezuelan economy, Caracas was buying Ortega’s support in Nicaragua with petro-dollars. The late Hugo Chavez even started a $500 million annual subsidy to Ortega himself.

Nicaragua is the only Central American member of Venezuela’s socialist-led ALBA (Bolivarian Alliance for the Peoples of Our America). A regional bloc of left-wing Latin American governments, ALBA aims to undermine U.S. interests in the region.

Venezuela’s influence is waning as its economy crumbles, but the ideological root of ALBA remains. With Ortega still in power, Nicaragua is certain to carry on hostility against the U.S.

Then there is Nicaragua’s close links to both Russia and China. As part of a security agreement between Ortega and Russian President Vladimir Putin, Nicaragua received 50 T-72 tanks free of charge.

Ortega is also reportedly allowing Russia to build an intelligence-gathering center north of the capital city Managua. Furthermore, a dubious Chinese company, possibly with the backing of Beijing, has plans to build an inter-oceanic canal through Nicaragua to rival the American-built one in Panama.

As all this has been going on, President Barack Obama and Congress have sat on their hands.

That may change in January. With a new U.S. president at the helm, Washington will have an opportunity to rectify the flawed foreign policy of the last eight years. We cannot continue to forsake our friends and appease strongmen like Ortega.

U.S. foreign policy toward Latin America should be driven by a realistic and principled objective: to advance American security and regional prosperity by promoting democratic reforms and good governance. Unfortunately, neither democracy nor good governance is to be found in Ortega’s Nicaragua.

If Congress continues to support international loans to Nicaragua, it must insist that they be tied to improvements in both areas. Otherwise, these loans constitute little more than disinterested charity for a dictator.

America does not always get to choose our friends, and we don’t have the luxury of insisting all our allies are Jeffersonian democracies. But that reality does not mean that we have to accept bad actors without question, and turn a blind eye to democratic abuses.

Ortega should be put on notice that if he wants the benefits of commerce with the United States, he will have to enact some basic reforms—reforms which are actually in the best interests of his country.

Our next president should demonstrate the strength to beat back the threats of communism, terrorism, and economic crisis in our hemisphere. Nicaragua and all freedom-loving people in Central America are depending on U.S. leadership.