Let's say you had a presidential challenger who was rising in popularity and stood a good chance to win.

And then, a month before the vote, a court disqualified that challenger.

Welcome to Peru.

The nation's presidential elections are at risk of descending into farce after authorities here yanked two of the top five candidates from the race, includingleading challenger Julio Guzman.

The Special Electoral Tribunal said Guzman failed to legally register his candidacy last year, because his nomination failed to comply with some filing details.

In a separate ruling, it upheld an accusation that fourth-placed Cesar Acuna had broken a new electoral law by handing out money to voters.

The candidates appealed. Another panel, the National Electoral Tribunal, has until Thursday to make a final decision. Experts believe it will likely uphold the lower court’s decision.

The ruling, barely a month before the April 10 first-round presidential vote, has been met with widespread ridicule in Peru and warnings that faceless bureaucrats were threatening the legitimacy of the entire presidential contest.

The move would be almost unprecedented in Latin America — other than in deeply troubled Venezuela and communist Cuba, where undemocratic regimes lock up political opponents. 

Guzman described it as an attempt to fix the election and part of a “corrupt system.”

It’s particularly galling for many Peruvians because Guzman, a center-right policy wonk who has taught at Georgetown University and the University of Maryland, had recently emerged from a crowded pack as the one challenger looking capable of beating frontrunner Keiko Fujimori in a June 5 runoff vote.

For many here, Fujimori’s election as president would represent nothing less than national ignominy.

Running on the controversial authoritarian legacy of her disgraced father, Alberto Fujimori, who was president from 1990 to 2000 but is now serving a 25-year jail term on corruption and human rights abuse charges, she consistently polls between 30 percent and 35 percent. 

Despite directing death squads, bribing journalists to smear his opponents and presiding over the vanishing of $600 million, many remember Fujimori senior for crushing the Shining Path terrorists and pulling Peru back from the brink of economic meltdown.

More from GlobalPost: Peru: forced sterilization cases reopened

David Sulmont, a politics professor at the Pontifical Catholic University of Peru, was scathing about the tribunal's decision, which he warned could undermine Peruvian democracy.

“If they discovered this error [with Guzman’s paperwork] in December, what is the reason for taking three months to make the decision?” he told Peruvian newspaper La Republica

“It is a display of impressive ineptitude. It’s as though in a game of soccer, I score a goal in the third minute and the referee decides to annul it in the 80th minute.”

Harvard political scientist Steven Levitsky, who also has a column in La Republica, noted that in established democracies candidates are only prevented from running for high office over fundamental breaches of the law, such as human rights violations, or when there is a clear constitutional prohibition on a president’s close family member campaigning to succeed them. 

“The exclusion of a candidate is a characteristic of authoritarian regimes: It happens in Russia, Iran, Egypt, Rwanda, and Venezuela,” he wrote. “In the last three decades, no Latin American democracy has excluded a viable candidate [like Guzman] for bureaucratic reasons. Not one.”

Other commentators have attacked the tribunal’s “fetishism” of the country’s excessive red tape, and favoring form over substance, including citizens’ right to choose their own president. 

Few are shedding any tears for Acuña, who has long been at the center of massive controversy. A self-made millionaire who owns several private universities, it emerged during the campaign that he had allegedly plagiarized his master’s and doctoral theses — and an entire book on education policy.

The candidate’s failure to adequately respond only made things worse. At one point, he even claimed: “It isn’t plagiarism. It’s copying.” 

Yet many here worry that pulling him from the presidential race is the wrong response, and that it should have been the voters who were given the chance to punish his misdeeds.

The problem is that a new electoral law that came into effect in January only allows for a single punishment — termination of a candidate’s electoral registration — if they are caught giving voters any kind of economic benefit during campaign rallies.

To complicate matters further, the JEE is now investigating allegations that Fujimori also gave out cash at her campaign meetings. Meanwhile, former President Alan Garcia, languishing in the polls with just 5 percent, also faces complaints that various misdeeds during his previous terms should see him excluded. 

Many here will be watching how Fujimori’s case unfolds. If nothing happens, voters will likely conclude the elections are rigged in her favor. And if she is excluded, even some of her opponents may lament losing the chance to beat her democratically in the voting booth.

A version of this story has been cross-posted to our colleagues at Global Post.

From PRI's The World ©2015 Public Radio International