An ex-metalworker who became one of Brazil's most popular presidents, Luiz Inacio Lula da Silva walked free from jail on Friday after spending a year and a half behind bars for corruption.

The 74-year-old leftist icon has been embroiled in a massive corruption scandal which has engulfed some of Brazil's most influential politicians and business leaders.

Lula is among nearly 5,000 inmates who could be released from prison after the Supreme Court on Thursday overturned a ruling that required the mandatory imprisonment of convicted criminals who have lost their first appeal.

Brazil's former president Luiz Inacio Lula da Silva, seen in a file photo taken on April 07, 2018, is expected to be freed from prison following a ruling by the country's Supreme Court Brazil's former president Luiz Inacio Lula da Silva, seen in a file photo taken on April 07, 2018, is expected to be freed from prison following a ruling by the country's Supreme Court Photo: AFP / NELSON ALMEIDA

Known for his charisma and common touch, Lula left office on January 1, 2011 as a blue-collar hero who presided over a watershed boom and helped lift tens of millions of people from poverty.

His hopes of running for a third term in the 2018 election were dashed after he was jailed for corruption and money laundering.

He has been serving a sentence of nearly nine years at the federal police headquarters in Curitiba.

Far-right President Jair Bolsonaro was swept to power in a vote Lula had been favored to win.

Supporters of former Brazilian President Luiz Inacio Lula da Silva celebrate on November 8, 2019, after a Supreme Court ruling expected to lead to his early release from prison Supporters of former Brazilian President Luiz Inacio Lula da Silva celebrate on November 8, 2019, after a Supreme Court ruling expected to lead to his early release from prison Photo: AFP / Henry MILLEO

"I am not worried, and my only concern is to prove my innocence," Lula told AFP, before his incarceration.

Cristiano Zanin (C) and Valeska Teixeira Zanin Martins, lawyers for Luiz Inacio Lula da Silva, spoke to journalists on November 8, 2019, after visiting the former Brazilian president at the Federal Police Headquarters in Curitiba Cristiano Zanin (C) and Valeska Teixeira Zanin Martins, lawyers for Luiz Inacio Lula da Silva, spoke to journalists on November 8, 2019, after visiting the former Brazilian president at the Federal Police Headquarters in Curitiba Photo: AFP / HENRY MILLEO

Brazil's first democratically elected leftist, Lula enjoyed widespread popularity, as a booming economy during a period of high commodity prices helped him ride out numerous corruption scandals.

He presided over a so-called golden decade for Latin America, when a rising China's ravenous demand for raw materials propelled regional economies to record growth.

Lula also helped secure for Brazil the world's two biggest sporting events -- the soccer World Cup in 2014 and the 2016 Olympic Games in Rio de Janeiro.

When he stepped down after two terms, he basked in 80 percent popularity ratings.

Supporters of former Brazilian President Luiz Inacio Lula da Silva celebrate a Supreme Court decision in Curitiba that could lead to his early release from prison Supporters of former Brazilian President Luiz Inacio Lula da Silva celebrate a Supreme Court decision in Curitiba that could lead to his early release from prison Photo: FRANKLIN DE FREITAS / FRANKLIN DE FREITAS

But his image has been tarnished by numerous corruption charges.

Lula was sentenced to almost 13 years in jail in February in a separate case, and he still faces an additional half-dozen corruption trials.

He has denied all the charges, arguing they were politically motivated.

Lula grew up in deep poverty, the seventh of eight children born to a family of illiterate farmers in the arid northeastern state of Pernambuco.

When he was seven, his family joined a wave of migration to the industrial heartland of Sao Paulo state, where Lula worked as a shoeshine boy and street peanut vendor before becoming a steelworker.

In the 1960s he lost the little finger of his left hand in a workplace accident.

He rose quickly to become president of his trade union, and was the force behind major strikes in the 1970s that challenged the military dictatorship then in power.

In 1980, he co-founded the Workers Party, first standing as its candidate for president nine years later.

Lula made three unsuccessful presidential bids, from 1989 to 1998, each time chipping away at the establishment parties and the idea that a poor, uneducated labor leader could never be president of Brazil.

The fourth time, in 2002, he succeeded, taking office on January 1, 2003.

Even though he is now free, Lula will be barred by his criminal record from resuming his political career.

bur-amj/dw