RIO DE JANEIRO — Brazil’s top court voted narrowly in the early hours Thursday to turn down an attempt by former President Luiz Inacio da Silva to stay out of jail while he appeals a corruption conviction, a decision that will have widespread implications in this polarized nation.

After nearly 11 hours of often heated debate, the justices of the Supreme Federal Tribunal voted 6-5 to deny da Silva’s preventative habeas corpus request to stave off a 12-year jail sentence while he fights a conviction in a case that he argues was nothing more than a ploy to keep him off of October’s presidential ballot.

Despite the conviction and several other corruption charges pending against him, da Silva leads all preference polls for the election. The decision means he will likely be jailed soon, though probably not until at least next week thanks to various technicalities.

Within minutes of the decision, da Silva’s Workers’ Party, which held Brazil’s presidency from 2003 to 2016, put out a tweet that foreshadowed the struggles to come.

“The Brazilian people have the right to vote for Lula, the candidate of hope,” it read. “The Workers’ Party will defend this candidacy on the streets and in every court until the last consequences.”

The court’s debate underscored how fraught the matter is at a time of high tension and angst in Brazil, which is struggling to emerge from a crippling recession and is four years into a major corruption scandal that has ensnared much of the country’s elite, including da Silva.

“The constitution secures individual rights, which are fundamental to democracy, but it also assures the exercise of criminal law,” said Chief Justice Carmen Lucia, who cast the deciding vote after spending much of the session being criticized by colleagues.

Justice Gilmar Mendes, traditionally a critic of da Silva, voted in favor of the former leader’s petition to stay out of jail, challenging his colleagues to buck pressure from society.

“If a court bows (to pressure), it might as well not exist,” said Mendes.

Justice Luis Roberto Barroso argued that the integrity of the justice system was at stake.

“A penal system that doesn’t work with minimal effectiveness leads to an instinct for taking justice into one’s own hands,” said Barroso, who voted against the petition.

Justice Rosa Weber, who legal analysts predicted would be key because there was much doubt about her position on the matter, voted against da Silva.

In one of several brisk exchanges, after Weber’s vote, justice Marco Aurelio Mello accused Lucia of plotting against da Silva’s case. Mello said limiting the vote just to the habeas corpus petition and not the larger question of when a convict should be forced to begin serving a sentence helped sway Weber’s vote.

“I want this to be registered in the court’s records,” Mello told Lucia, who responded by saying “yes” to the request.

The session reflected the debate happening across Brazil as millions tuned into the televised session. When the decision was leveled, fireworks and yells could be heard and seen in Rio de Janeiro and Sao Paulo, two of the nation’s most important cities.

Da Silva was once wildly popular after his two terms as president from 2003 to 2010, but he has become a polarizing figure amid the “Car Wash” corruption scandal that has roiled Brazil the last several years and made average citizens furious with the political class.

Da Silva was convicted in July of helping a construction company get sweetheart contracts in exchange for the promise of a beachfront apartment. He denies any wrongdoing in that case or in several other corruption cases that have yet to be tried. An appeals court upheld the conviction in January, and the three reviewing magistrates even lengthened the sentence to 12 years and one month.

Technically, the Supreme Federal Tribunal’s decision doesn’t keep da Silva off the ballot. The country’s top electoral court makes final decisions about candidacies beginning in August, but it has been expected to deny da Silva’s candidacy under Brazil’s “clean slate” law, which disqualifies people who have had criminal convictions upheld.

Thursday’s decision was about much more than the future of a once towering politician trying to make a comeback. Many legal observers had said that allowing da Silva to stay out of jail could have a big impact on all the other cases related to “Car Wash” and other white-collar criminals with the means to continue appealing.

Congressman Jair Bolsonaro, a right-leaning legislator who is running second in the polls behind da Silva, summed up what many da Silva detractors were likely thinking.

“Brazil hopes that after today’s vote Sergio Moro is able to order his arrest to show corruption doesn’t work,” Bolsonaro said while demonstrating outside Congress in Brasilia during the session. “We should never do politics like this again. Crooks should not have votes. They should have a cell.”


Peter Prengaman on Twitter: twitter.com/peterprengaman

Mauricio Savarese on Twitter: twitter.com/MSavarese