Updated

The man easily favored to win Brazil's presidential election in October probably won't be on the ballot — blocked because of a conviction corruption that stems from a nationwide investigation that has ensnared many of the country's top businessmen and politicians. Here's a look at details of the case:

THE CONTROVERSY

Brazil's top electoral court is expected to soon rule on whether leftist former President Luiz Inacio Lula da Silva can run for president despite a corruption conviction. Nearly all experts expect the court to rule against him, throwing the presidential race in the Latin America's largest nation into uncertainty.

That's causing renewed scrutiny at home and abroad of the 238-page conviction for corruption and money laundering imposed in July 2017 by Brazil's most famous judge.

Da Silva says the conviction and 12-year sentence amount to a "coup" by right-wing forces trying to prevent his return to office. Detractors say he's guilty and the nation can only move beyond a culture of endemic graft if the law applies to all.

Da Silva has won support abroad from figures including former U.S. presidential candidate Bernie Sanders and U.N.-appointed human rights experts. Writing an op-ed in the New York Times this month, Jorge Castaneda, a former Mexican foreign minister, also argued that da Silva should be allowed to run despite the conviction.

"The charges brought against him are too flimsy, the purported crime so petty (until now), the sentence so brazenly disproportionate and the stakes so high that in Latin America today, democracy should trump — so to speak — the rule of law," he wrote.

THE CASE

Judge Sergio Moro ruled that the former president helped steer contracts to construction company Grupo OAS before leaving office on Jan. 1, 2011.

In exchange, the judge said, da Silva was promised a renovated beachfront apartment worth about $1.1 million in Guaruja, a city outside of Sao Paulo.

Da Silva backers argue there was no crime because neither he nor his late wife ever legally owned the apartment. Moro said the intent to give it to him made it a crime.

Writing an op-ed in the New York Times this month, da Silva said the "linchpin" in the case against him was testimony from a man with a "personal interest to tell authorities what they wanted to hear." Da Silva was referring to former OAS president Leo Pinheiro, who got a reduced sentence after testifying that he met with da Silva in 2014 to discuss giving him the apartment as a gift.

Law professor Maristela Basso of the University of Sao Paulo said that a plea bargain in Brazil "has to be combined with other evidence" to win conviction. "So to say it was all based on Pinheiro is not true."

THE EVIDENCE

Witnesses testifying against da Silva included other top officials from OAS and another construction company, a former senator from da Silva's Workers' Party and a black-market money dealer at the center of the sprawling Carwash corruption investigation.

Prosecutors also presented text messages in which OAS executives discussed renovations on the apartment using code names "boss" and "madam," allegedly referring to da Silva and his wife.

"The boss's kitchen project is ready, so we can set up an appointment with madam whenever you want," Paulo Gordilho, then OAS director, told Pinheiro, according to the sentencing document.

Moro noted that while OAS bought the building in 2009, it never put the unit in question up for sale or showed it to other potential buyers. Renovations to the apartment were made in 2014 after da Silva and his wife came to view it and before da Silva's wife made a second visit herself. Moro's decision says the work — which included installation of a sauna and increasing the size of a pool deck — is not the sort of renovation OAS typically does.

The deal apparently fell apart at some point in 2014, a time when Judge Moro and prosecutors were ramping up investigations into corruption in government contracts. Hundreds of businessmen and politicians, including many officials in da Silva's 2003-2010 administrations, were implicated.

DA SILVA'S VERSION

The former president acknowledged interest in buying the apartment as an investment, not receiving it as a gift. In his initial statements to investigators, da Silva said he decided against buying the apartment after his wife visited a second time in August 2014. He later changed that when testifying before Moro in 2017, saying he backed out after the couple's initial visit — before the renovations began that the judge says were made for them.

Cristiano Zanin, one of da Silva's attorneys, said the initial statements shouldn't have been part of the evidence because they were made when the former president was "illegally detained" for six hours in early 2016.

CONFIRMATION OR COINCIDENCE?

"The sentence is a jigsaw puzzle," said Rodrigo Falk Fragoso, a professor of criminal law at the Catholic Pontificate University in Rio de Janeiro. "There isn't one direct piece of evidence of the property being transferred, but rather a combination of indications that the judge considered enough to determine a crime had been committed."

DID THE PUNISHMENT FIT THE CRIME?

Even some who believe a conviction was warranted say the sentence is too long, largely because of the serious charge of money laundering.

Francisco Monteiro Rocha Junior, a law professor at the Federal University of Parana, argued that da Silva's actions didn't fit the legal definition of money laundering, which is hiding the origin of payments and using the money for lawful transactions in the future.

Still, the sentence length is in line with others leveled by Moro against politicians from opposition parties, such as former House Speaker Eduardo Cunha, sentenced to 15 years for corruption.

The length of the sentence reduces the chances that da Silva could get out of prison in time to run for office. Da Silva and supporters argue that ensuring he can't run has always been part of the plan by opponents.

THE APPEALS

The country's top court, the Supreme Federal Tribunal, which includes justices appointed by da Silva, earlier this year narrowly rejected his petition to be released from prison while he appeals. And in January, an appeals court with three magistrates unanimously upheld the conviction, of 9 ½ years, and extended it to 12 years and 1 month.

"Lula says there is a judicial conspiracy," said Jovacy Peter Filho, a criminal lawyer in Espirito Santo who thinks overall the evidence was weak. "But it's harder to keep saying that after the appeals court upheld the conviction."