Former Brazilian President Luiz Inacio Lula da Silva has been convicted of taking bribes and money laundering in a massive corruption scandal that has swept the country's political establishment.

Brazilian federal judge Sergio Moro, who is leading the multi-billion dollar corruption probe known as Carwash, sentenced the 71-year-old for nine and a half years in prison. Lula will remain free on appeal.

Moro found Lula guilty of accepting $1.2 million worth of bribes from the engineering firm OAS SA. Prosecutors said the company spent the same amount refurbishing a beach apartment for Lula in return for his helping in winning contracts with state oil company Petroleo Brasileiro.

The case is part of a massive corruption investigation that has roiled Brazilian politics that has seen business executives and elite politicians jailed.

"The present conviction does not bring this judge any personal satisfaction. Quite the contrary, it is regrettable that a former president be criminally convicted," federal Judge Sergio Moro wrote in his decision. "It doesn't matter how high you are, the law is still above you."

Moro said he did not order Silva's immediate arrest because the conviction of a president is such a serious matter that he felt an appeal should be heard first.

Lula, who is considered one of Brazil’s most popular leaders, was president between 2003 and 2010.. His handpicked successor, Dilma Rousseff, was impeached last year over accusations of budget mishandling.

The Associated Press contributed to this report.