Brazil's former President Luiz Inacio "Lula" da Silva has been convicted of corruption and money laundering, and sentenced to nine and a half years in jail - but he remains free pending an appeal.

Lula is accused of receiving more than $1m in bribes from Brazilian construction giant OAS in the form of a luxury apartment in a beach resort town on Sao Paulo's coast.

The conviction is the latest and most significant in a sprawling three-year corruption investigation dubbed "Car Wash" that has ensnared many of Brazil's business and political elites.

Lula's legal team blasted the conviction for lack of evidence and said in a statement: "President Lula is innocent. For over three years, Lula has been subject to a politically motivated investigation."

OPINION: The Brazilian hangover - When the party ends

The former trade union leader turned president oversaw a period of sustained growth in Brazil, fed by a commodities boom, that saw millions lifted out of poverty during his presidency between 2003 and 2010.

Lula has stated that he intends to run for president again in Brazil's 2018 elections for the Workers' Party, of which he was a founding member, and currently leads opinion polls by a significant margin - though his rejection rates are also very high.

The corruption allegations against Lula over the past few years have tarnished the reputation of the man that then US President Barack Obama called "the most popular politician on earth," but he remains very popular.

Recent opinion polls in Brazil, taken during a period of severe economic recession and record unemployment, even show that support has grown, both for Lula and the Workers' Party.

"There is a part of the electorate that will say: all politicians are corrupt, but at least Lula did something good for Brazil," Mauricio Santoro, a political scientist and professor of external relations at Rio de Janeiro State University, told Al Jazeera.

Lula's chances of running for president for an unprecedented third time would end, however, if a higher court rejects his appeal and decides to uphold the conviction. The legal process has no fixed timeline but is likely to drag on for months.

The same court also recently absolved one of Lula's allies, the former Workers' Party treasurer Joao Vaccari Neto, who was sentenced to 15 years for taking bribes by the same judge, Sergio Moro, who convicted Lula.

READ MORE: Brazil's prisons - A battleground in the drug wars

The court's decision promises to be controversial either way, with complaints of judicial corruption, if the case is thrown out, and claims of political persecution, if Lula is jailed. Even if absolved, Lula faces four other charges under the Car Wash investigation.

Markets reacted positively to Lula's conviction and Brazil's currency - the real - gained value. Some rival politicians celebrated Lula's conviction on social media.

"Justice was done. The biggest chutzpah in Brazil was sentenced to nine and a half years in jail," Sao Paulo Mayor Joao Doria of the centre-right Social Democratic Party of Brazil (PSDB), posted on Twitter.

Doria himself has been consistently quoted as a candidate for Brazil's 2018 presidential elections although he hasn't confirmed his candidacy yet.

Lula's conviction is the latest chapter of an acute political crisis engulfing Brazil. Last year, President Dilma Rousseff was impeached accused of manipulating federal budgets. Last month, sitting President Michel Temer was charged with taking bribes and is under increased pressure.

Born to an impoverished family in Brazil's arid Northeast, Lula rose through the ranks of Sao Paulo's metalworkers' trade unions and led strikes during Brazil's then military dictatorship.

His ascent to the presidency in a country with one of the world's biggest wealth gaps was heralded as a success story of Brazil and he remains the only president to leave office with high approval ratings.