GUATEMALA CITY—Historians will deem ours a strange epoch, renowned French author Andre Malraux said a half-century ago, in which the right was not the right, the left was not the left and the center was not in the middle. The description fits today’s Nicaragua: Sunday’s presidential elections, which Sandinista leader Daniel Ortega appears to have won in the first round, confirm that the country is upside down.

More than six years ago, President Arnoldo Aleman and his conservative Constitutional Liberal Party wrecked Nicaragua’s transition to the rule of law by sealing an infamous deal with the Sandinistas that gave Ortega, who had been rejected by the voters in 1990, virtual control of the key political institutions. The power-sharing arrangement, known as “El Pacto,” guaranteed Aleman impunity for his corrupt administration and allowed the Sandinista leader to rise from the ashes, providing him with the means to wield power over significant segments of the population.

Next, the Marxist revolutionary became a political transvestite, putting on a Christian costume to further broaden his appeal. Last year, Ortega married his longtime partner in a Roman Catholic ceremony presided over by Cardinal Miguel Obando y Bravo and this year he instructed his legislators to vote for a law banning abortion even in cases of life-threatening pregnancy. The result? Well, his all-but-declared first-round victory in Sunday’s elections.

Under the pact, the Sandinistas gained control of the judiciary and thus protected Ortega from charges of molestation leveled against him by his stepdaughter, Zoilamerica Narvaez. The power-sharing arrangement also guaranteed that the “Pinata”—the infamous distribution of government assets and confiscated property that the Sandinista leaders shared among themselves after losing the 1990 elections to Violeta Chamorro—would not be reversed. As part of that rapacious feast that robbed Nicaraguans of hundreds of millions of dollars, Ortega moved into a $1-million house seized from businessman and former contra Jaime Morales. (Confirming that everything is upside down in Nicaragua, Morales was Ortega’s running mate in this election!)

The pact’s stranglehold on Nicaragua’s institutions has been such that the government of outgoing President Enrique Bolanos, who tried to fight corruption after his election in 2001, was reduced to near impotence in the last five years.

The result of Nicaragua’s crooked transition from Sandinista dictatorship to democracy can be gauged on many levels. According to a study by investigative reporter Jorge Loaisiga, the government over the last 15 years has spent $1.104 billion in compensation bonds paid to various types of claimants and another $500 million setting up bureaucratic structures to deal with the labyrinthine property rights disputes arising from the Sandinista land confiscations. In the absence of legal safeguards and enforceable property rights, the economy has been extremely weak. Nicaragua exports barely $800 million a year and is the poorest nation in the hemisphere after Haiti.

The political consequences of the failed transition were seen on Election Day Sunday. Because the pact lowered the bar for a first-round victory in the elections, Ortega, one of the major culprits of Nicaragua’s plight, needed only 35 percent of the vote, and a five-point lead over the runner-up in order to avoid a runoff. So, with 39 percent of the vote and with two-thirds of Nicaraguans dead set against him, Ortega is now almost certainly the president-elect although a few votes still need to be counted before his victory can be formally announced.

The best hope for a different outcome was with the center-right Nicaraguan Liberal Alliance, led by former Foreign Minister Eduardo Montealegre, and the centrist Sandinista Renovation Movement, which broke ranks with the Sandinistas a few years ago and whose candidate, Edmundo Jarquin, shared many values with Montealegre. But the center-right vote was split between Montealegre and Aleman’s PLC party, while Jarquin actually took more votes away from Montealegre than from Ortega.

Ortega’s assurances that he will respect private property and the rule of law sound pretty empty, judging by his close ties to Hugo Chavez, who has given subsidies to Sandinista-governed municipalities, and the fact that the Sandinista leader has been one of the pillars of corruption and the suffocating politicization of civil society since he left office. The fact that Aleman and his conservative group were their loyal allies in the process and have now helped Ronald Reagan’s old foe get back into government is a particularly poignant twist of history.