The former two-term president of Brazil, Luiz Inácio “Lula” da Silva, was sentenced July 12 to nearly 10 years in prison.

It is the most dramatic chapter to date in the saga of public corruption scandals that has plunged South America’s largest country into political chaos.

The crimes for which Lula was found guilty—including money laundering and accepting a bribe in the form of a beachside apartment for political favors—are certainly significant.

More importantly, however, they illustrate how Brazil’s public (and private) elites have been behaving—very badly, it turns out. This was especially the case during the commodity boom that began more than a decade ago—the same years that Lula’s socialist Workers’ Party was at the zenith of its power.

Lula faces trials on additional corruption charges that may block him from seeking re-election as president in 2018.

Meanwhile, Lula’s hand-picked successor, Dilma Rousseff, was impeached and removed from office following a scandal over budgetary shenanigans to boost vote-buying spending measures in advance of her squeaker re-election victory in the 2014 election.

Cronyism and corruption have affected all political parties in Brazil. Michel Temer, who assumed the presidency upon the removal of Rousseff, has also been tainted by corruption allegations.

The New York Times reports that Temer faces the same prospect of “being ousted from office and sent to prison.”

So far, the only heroes to emerge in this long-running drama are Brazil’s prosecutors and judges. Sergio Moro, who presides over the biggest corruption investigation of them all (dubbed “Operation Car Wash”), has become a folk hero for Brazilians who want clean government.

Although in a notorious and defiant tweet the former president blamed all corruption in Brazil on the private sector, he was convicted of public corruption after a fair trial.

When he sentenced Lula to prison, Moro reminded him that no one is above the law.

The Heritage Foundation’s Index of Economic Freedom has recorded a steady drop in Brazil’s score in the years since Lula was elected, accompanied by a shift in Brazil’s status from a “Mostly Free” to a “Mostly Unfree” economy.

A big reason for the drop is weak rule of law. It will take more people like Moro, with a firm stand on principle, to restore it.