An appeals court in Brazil convened Wednesday to issue a ruling critical to former president Luiz Inacio Lula da Silva's hopes of standing for election again this year.
The three-judge panel is to rule on an appeal by the hugely popular leftist icon against a corruption conviction in Brazil's sprawling "Car Wash" graft scandal.
The stakes are huge and thousands of Lula supporters and opponents have camped out in this southern city awaiting the ruling.
Police surrounded the district that includes the court, which is in the middle of a park, and helicopters flew overhead.
Widely beloved during his two-term presidency from 2003 to 2010, Lula was sentenced in July to nine and a half years behind bars after being convicted of corruption in the "Car Wash" scandal.
The appeals court will rule whether to uphold that conviction for passive corruption and money laundering and in the process help determine if Lula can run in an election in October he is favored to win.
The court is seen as likely to uphold the conviction. Lula can appeal but this would drag on for months.
The Eurasia Group consultancy said the court will probably uphold the conviction "and Lula will probably be disqualified in final decisions by the Supreme Court and the electoral court" but closer to election time.
Lula was defiant at a rally Tuesday night.
"Only one thing will take me off the streets of this country, and it will be the day of my death," Lula told cheering supporters, many wearing the red T-shirts of his Workers' Party (PT).
"Until that moment, I will fight for a more just society. Whatever the outcome of the trial, I will continue fighting for the dignity of the people of this country."
Lula was joined on the podium by his handpicked successor Dilma Rousseff, who was impeached in 2016 for breaking budget rules.
"I am not going to speak today about my trial or about justice, because I have competent lawyers who have proven my innocence," he said.
"I come here to talk about Brazil," added Lula.
"I have the peace of the innocent, of those who did not commit any crime. Are they afraid of me coming back? They are afraid of the good things we did," he said, referring to his right-wing opponents.
Lula, Rousseff and leftist leaders say they are the victims of a plot by the judicial, political and business sectors to sideline the PT.
- High security -
Authorities in Porto Alegre have mounted a special security operation to keep opponents and supporters of Lula apart over fears of clashes.
Helicopters will overfly the courthouse and even ships are being used to protect the building, located adjacent to a river.
Lula will follow the ruling from his home in Sao Paulo.
Rousseff had earlier denounced what she called the "third stage of the coup" against Lula.
The first, she argued, was her impeachment, the second consisted of the austerity budget introduced by her successor Michel Temer and the third "aiming to destroy the PT and especially our leader."
- Markets alert-
Analysts said the markets were betting on Lula's sentence being confirmed by the court.
"Markets cannot hide their enthusiasm: a ruling against Lula, who has promised to revert part of President Michel Temer's business-friendly reforms, is widely seen as a fatal blow to his presidential bid," said Silvio Cascione in a note from the Eurasia consultancy.
However, the Sao Paulo stock exchange closed Tuesday down 1.22 percent, which analysts attributed to caution ahead of the verdict.
Whatever the verdict, the court decision will constitute a new test for Brazilian democracy.
"If Lula can't run, the election is very uncertain and we would have five or six candidates with the possibility of reaching the second round, which would make the 2018 elections the most unpredictable since the restoration of democracy (in 1985)," political scientist Mauricio Santoro of Rio de Janeiro State University told AFP.
In the most recent survey by Brazilian pollsters Datafolha, at the beginning of December, Lula had 34 percent of voter intentions, followed by the right-wing deputy Jair Bolsonaro, with 17 percent.