From palace to prison: Brazil's ex-president Lula in dates

Luiz Inacio Lula da Silva, seen here in 2006, was Brazil's most popular president

Brazil's ex-president Luiz Inacio Lula da Silva, better known as Lula, was Friday dealt a blow by an electoral court that barred him from running in October's presidential election.

The 72-year-old has been leading polls in Latin America's largest economy despite his incarceration for corruption.

Here is a list of key dates in the life of one of the world's most popular politicians.

- October 27, 1945: Lula is born to a poor farming family in Brazil's northeast. His family moves when he is seven to the state of Sao Paulo to escape hunger.

- 1975: He becomes president of the metal workers' union, having worked in that sector since the age of 14.

- 1978-80: At the height of the military dictatorship, Lula leads major strikes in the industrial suburbs and is jailed for a month for his role.

- 1980: Lula co-founds the leftist Workers' Party (PT) and goes on to take part in the creation, in 1983, of the Unified Workers' Central (CUT), which becomes Brazil's largest trade union federation.

- 1986: He is elected to Congress.

- First leftist president -

- 2003: Lula becomes Brazil's first leftist president after winning election in the previous year. He is re-elected in 2006 for a term ending in 2010.

- 2016: The Supreme Court blocks his appointment as chief of staff to President Dilma Rousseff, his handpicked successor. She is then impeached in August after allegations of financial wrongdoing.

- July 2017: Lula is found guilty of receiving a bribe from a Brazilian construction company in return for contracts with state oil giant Petrobras. He is sentenced to nine and a half years behind bars.

- January 2018: He loses an appeal and his sentence is increased to 12 years and one month.

- April 5, 2018: After losing an appeal to delay the start of his sentence, Lula is ordered to turn himself in within 24 hours. He defies the order but later agrees to comply.

- April 7, 2018: Shortly before midnight, Lula becomes an inmate at the federal police headquarters in Curitiba.

- August 15, 2018: Lula's Workers' Party officially registers his presidential candidacy.

- August 31, 2018: A majority of Brazil's electoral court bars Lula from running in October's election.