Brazil's Lula: From president to prisoner
It took Luiz Inácio Lula da Silva four attempts before he was finally elected Brazil's president in 2002.
He came to office as the first leftist leader in Brazil in nearly half a century. And he left eight years later, after serving two terms as president, enjoying exceptionally high popularity ratings for a retiring Latin American leader.
His 2002 election victory marked the end of an unprecedented journey from abject poverty to the presidency of his country.
Lula came to power promising major reforms to the country's political and economic system.
He vowed to eradicate hunger and create a self-confident, caring, outward-looking nation.
Analysts say it was because of some of his government's social programmes, which benefited tens of millions of Brazilians, that Lula retained his popularity.
He raised Brazil's profile on the international scene and presided over Brazil's longest period of economic growth in three decades, they add.
Unable to stand for a third consecutive term, Lula was succeeded by close ally Dilma Rousseff, who was later impeached.
The economic boom also gave way to recession, and the country's political scene was rocked by a huge investigation into top-level corruption, known as Operation Car Wash.
Lula was among those to get caught up in the scandal. In July 2017, he was convicted of corruption and sentenced to more than nine years in prison for accepting a beachside apartment as a bribe from engineering firm OAS.
The judge overseeing the case was Sergio Moro, who led Operation Car Wash.
Lula has always maintained his innocence and his lawyers have appealed against his conviction, but have so far failed to have it overturned.
The lawyers argue that Mr Moro was biased against Lula and wanted to keep him from running in the 2018 presidential election, which opinion polls suggested he would win by a landslide.
Mr Moro has denied any bias and pointed to the fact that an appeals court upheld Lula's conviction in January 2018 and increased his sentence from nine to 12 years in jail.
But questions about Mr Moro's role in Lula's trial surfaced again in June 2019 when news website The Intercept published a report based on what it said where leaked messages between Mr Moro and Operation Car Wash prosecutors.
The Intercept said the messages raised serious questions about Mr Moro's impartiality. Mr Moro has denied any wrongdoing but Lula's lawyers say their client's conviction should be overturned in light of the leaked documents.
However, Lula has not just been convicted over the beachside apartment. He is also serving a sentence of 12 years and 11 months for corruption and money laundering for receiving bribes by two construction and engineering firms by way of funding improvements in a country house he and his family used.
He insists all the accusations levelled against him have been politically motivated.
Road to pragmatism
Lula's life began in humble circumstances.
The son of a poor, illiterate peasant family, Lula worked as a peanut seller and shoe-shine boy as a child, only learning to read when he was 10 years old.
He went on to train as a metalworker and found work in an industrial city near São Paulo, where he lost the little finger of his left hand in an accident in the 1960s.
Lula was not initially interested in politics, but threw himself into trade union activism after his first wife died of hepatitis in 1969.
Elected leader of the 100,000-strong Metalworkers' Union in 1975, he transformed trade union activism in Brazil by turning what had mostly been government-friendly organisations into a powerful independent movement.
In 1980, Lula brought together a combination of trade unionists, intellectuals, Trotskyites and church activists to found the Workers' Party (PT), the first major socialist party in the country's history.
The PT went on to gradually replace its revolutionary commitment to changing the power structure in Brazil with a more pragmatic, social democratic platform.
Before his 2002 election victory, Lula had previously lost three times and he began to believe his party would never win power nationally without forming alliances and keeping powerful economic players onside.
The Workers' Party manifesto reflected these sometimes conflicting visions but overall remained committed to prioritising the poor, encouraging grassroots participation and defending ethical government.
Performance in power
In his time in office, Lula pumped billions of dollars into social programmes and can reasonably claim to have helped reverse Brazil's historic inequalities.
By increasing the minimum wage well above the rate of inflation and broadening state help to the most impoverished with a family grant programme, the Bolsa Familia, he helped some 44 million people and cemented his support among the poor.
However, many commentators argue that the programme failed to address the structural problems that underpin poverty, such as a lack of education.
There was also some criticism of the country's economic performance under Lula. Although Brazil saw steady annual growth, some business leaders argued it lost its competitive edge against international rivals.
Nonetheless, his government quelled fears in financial markets by keeping the economy stable and achieving a budget surplus.
Shortly after leaving office, Lula was diagnosed with throat cancer. He even shaved his trademark beard during treatment. Doctors declared him cured of the disease in 2012.
His wife, Marisa Leticia da Silva, died in February 2017 after suffering a brain haemorrhage.
Despite the setbacks he has suffered, Lula has remained defiant, telling German news magazine Der Spiegel in June 2019 that "there is no party in Brazilian history that has created more instruments for combating corruption than the PT".