Former Brazilian leader Luiz Inacio Lula da Silva, who rose from childhood poverty to become a two-term president, was convicted on corruption charges on Wednesday in the first of five graft trials he faces.
He was sentenced to nine and a half years in prison. He will remain free on appeal.
The ruling marked a stunning fall for Lula, Brazil's first working-class president who left office six years ago with an 83-percent approval rating. The former union leader won global admiration for transformative social policies that helped reduce stinging inequality in Latin America's biggest country.
Former U.S. President Barack Obama once labeled him the most popular politician on earth.
The verdict represented the highest-profile conviction yet in the sweeping corruption investigation that for over three years has rattled Brazil, revealing a sprawling system of graft at top levels of business and government and throwing the country's political system into disarray.
Judge Sergio Moro found Lula guilty of accepting 3.7 million reais ($1.2 million) worth of bribes from engineering firm OAS SA, the amount prosecutors said the company spent refurbishing a beach apartment for Lula in return for his help winning contracts with state oil company Petroleo Brasileiro.
Federal prosecutors have accused Lula, who first took the presidency in 2003, of masterminding a long-running corruption scheme that was uncovered in a probe into kickbacks around Petrobras.
Lula's legal team has previously said they would appeal any guilty ruling. They have continuously blasted the trial as a partisan witchhunt, accusing Moro of being biased and out to get Lula for political reasons.
Moro has denied the accusations.
Lula's lawyers did not immediately respond to requests for comment.
Senator Gleisi Hoffmann, the head of the Workers Party, lashed out at the ruling, saying Lula was convicted to prevent him from running for the presidency next year. She said the party would protest the decision and was confident the ruling would be overturned on appeal.
The Brazilian real extended gains following Moro's decision and reached its strongest in two months. The benchmark Bovespa stock index rose to a session high.
Despite the conviction and other charges against him, Lula remains a popular figure among many Brazilian voters, according to recent polls, and has said he wants to run again for the top office next year.
But he would be barred from office if his guilty verdict is upheld by an appeals court, which is expected to take at least eight months to rule.
If he cannot run, political analysts say Brazil's left will be thrown into disarray, forced to rebuild and somehow find a leader who can emerge from the immense shadow that Lula has cast on Brazilian politics for three decades.
"Lula's absence opens a gaping hole in the political scene, it creates an enormous power vacuum on the left," said Claudio Couto, a political scientist at the Getulio Vargas Foundation, a top university. "We have now entered a situation of extreme political tension, even beyond the chaos we have been living for the last year."
Couto said he expected Lula's guilty verdict to be upheld by the appeals court. That would leave the 2018 presidential race wide open and raise chances of a victory by a political outsider, given most known contenders are also ensnared in Brazil's corruption investigations.
Boom to bust
Lula's two-terms were marked by a commodity boom that momentarily made Brazil one of the world's fastest-growing economies. His ambitious foreign policies, aligning Brazil with other big developing nations, raised the country's profile on the global stage.
With Lula's swagger setting the tone, Brazil sought to shrug off northern economic and political hegemony and engage in global problems, like Middle East peace and the standoff over Iran's nuclear program.
But upon leaving office and managing to get his hand-selected successor Dilma Rousseff elected, Brazil's economy soured, with the nation just now beginning to emerge from its worst recession on record.
Rousseff was impeached last year for breaking budgetary rules. She and her backers say her ouster was actually a 'coup' orchestrated by her vice president and now President Michel Temer, who himself faces corruption charges.
During his trial, Lula gave five hours of fiery and defiant defense, proclaiming his innocence and saying that it was politics and not the pilfering of public funds that put him on trial.
"But what is happening is not getting me down, just motivating me to go out and talk more," Lula said in his testimony. "I will keep fighting."