Former Brazilian President Luiz Inácio Lula da Silva arrives at his home in Sao Bernardo do Campo, Brazil on April 4, 2018 (Photo via REUTERS/Paulo Whitaker)

Following a 6-5 vote in the Supreme Court (STF), former Brazilian president Luiz Inácio Lula da Silva has lost his habeas corpus appeal, meaning that he must serve time in prison while he appeals a corruption conviction.

The STF decision, which came after more than 10 hours of speeches from the 11 justices on the supreme court and multiple breaks, ends Lula’s hopes to avoid jail for a conviction that he calls politically-motivated. The decision comes in the run-up to the October presidential elections and deepening polarization in South America’s largest economy. Lula has won the endorsement of the Workers’ Party (PT) to run for the presidency but faces a challenge from electoral laws prohibiting candidates who have had criminal convictions upheld.

Ahead of the Supreme Court’s ruling there have been rallies in favour and against Lula and the reasoning and the vote of each of the 11 justices was followed closely during a tense afternoon. Prior to today’s Supreme Court ruling, the key swing vote belonged to Justice Rosa Weber, who eventually voted against the habeas corpus. With votes tied 5-5, Chief Justice Carmen Lucía Antunes Rocha broke the tie.

Justices Gilmar Mendes, Dias Toffoli, Celso de Mello, Marco Aurélio and Ricardo Lewandowski voted in favor of the habeas corpus whereas their colleagues Justices Luiz Fux, Rosa Weber, Roberto Barroso, Edson Fachin and Alexandre de Moraes did not.

Lula’s defense team had lodged an habeas corpus appeal before the Supreme Court to receive assurances that he not face time in prison for a corruption and money-laundering conviction until every appeal is exhausted.

As a result of the Supreme Court’s decision to reject the habeas corpus, a judge can order Lula’s arrest. An injunction ordered by the Supreme Court preventing da Silva’s arrest while it handled his petition was also quashed following the vote to reject the habeas corpus.

Groups of supporters and opponents of Lula rallied ahead of the ruling, reflecting the divisions that have been visible recently over the fate of the former president.

In January of this year, an appeals court upheld a graft conviction from July 2017 that considered da Silva guilty of accepting R $3.7 million (US $1.2 million) worth of bribes from engineering firm OAS S.A., which prosecutors said the company spent refurbishing a beach apartment for Lula in return for contracts with state oil company Petrobras. He can still appeal the conviction before the Superior Court of Justice (STJ) and ultimately the STF if necessary. The former president has strenuously denied any kind of wrongdoing.

The appeals court upheld a sentence issued by Judge Sergio Moro, and the court increased the prison sentence to 12 years and one month. One of the judges found evidence that Lula had “personally benefited” from the bribes offered to the Workers’ Party (PT) while another concluded that Lula had a role in the graft scheme directed by Petrobras, according to La Nación.

The Supreme Court’s decision has huge ramifications, given the intense polarization that has seized Brazilian politics in recent years, in particular in light of the upcoming presidential elections. Lula is currently leading the polls for the October presidential elections, and has won the endorsement from the PT to return to Planalto, as electoral law that prohibits candidates with convictions that have been upheld. Lula’s bid has not been formally registered with electoral authorities yet, as the window opens in August.

Last week Lula’s caravan was shot at in Paraná state, and the former president has denounced a campaign by “fascists” against his candidacy. In the days since there have been large rival rallies in favor and against Lula serving time and more are expected today.

On Wednesday night the head of the Brazilian Army General Eduardo Villas Boas got tongues wagging by tweeting that the Army shared the “anxiety of all upstanding citizens against impunity and respecting the Constitution, social peace and Democracy, as it remains mindful of its institutional missions.” The PT called the tweet “blackmail” against the courts and today Brazilian President Michel Temer’s Security Minister Raul Jungmann defended Villas Boas’s comments as demonstrating “respect for institutions.”

In his statements in the Supreme Court, Justice de Mello condemened any kind of military interventionism as “unacceptable” and underlining the primacy of civilian rule.