Brazil’s performance in the 2018 edition of The Heritage Foundation’s Index of Economic Freedom confirms yet again that South America’s biggest country remains burdened by too much government spending, corruption, and regulatory inefficiency.

Historically, a significant reason for Brazil’s lackluster track record on economic freedom has been its weak rule of law.

Last month, however, a regional appeals court in the southern city of Porto Alegre gave the beleaguered rule of law in Brazil a boost.

As The Washington Post reported, the court “unanimously upheld a corruption conviction against former Brazilian President Luiz Inacio Lula da Silva” and said that there is “proof beyond a reasonable doubt that the ex-president was one of the actors, if not the principal actor, of an ample corruption scheme.”

That’s going to make it more difficult for “Lula” to make a political comeback because, as the report continued, “Brazil’s ‘clean record law’ bars politicians with convictions upheld on appeal from running for office.”

Lula had been hoping to run for a third term as president in October. He served two presidential terms until 2011, when he was succeeded by Dilma Rousseff, his former chief of staff, who continued his fiscally unsustainable leftist and populist agenda.

Michel Temer assumed the presidency in 2016, however, after Rousseff was impeached and removed from office for alleged budgetary misconduct to buy votes ahead of her 2014 re-election. Rousseff’s political capital and favorability ratings also were damaged badly by a severe economic downturn in Brazil in 2016 precipitated by crashing commodity prices.

In the boom times preceding that crash, Lula and Rousseff spent freely. They ramped up government spending and expanded state-owned enterprises—thereby increasing opportunities for corruption among their cronies. It was the biggest of those ensuing corruption scandals, “Operation Car Wash,” that brought about Lula’s downfall.

That fall from grace was confirmed by the appeals court’s unanimous ruling, which upheld Lula’s original corruption conviction and actually increased his original sentence—from nine and a half years to now 12 years in prison.

According to a BBC report, Lula still faces numerous additional court trials on a host of other charges growing out of the sprawling “Car Wash” scandal, including money laundering, influence peddling, and obstruction of justice.

Reuters reported that, following the appeals court decision, Brazil’s Bovespa stock market index spiked owing to “investor expectations [that Lula’s] exclusion from the 2018 race will clear the way for a more market-friendly candidate who can stick to Brazil’s austerity agenda.”

As The Wall Street Journal’s Mary O’Grady reported, the Lula conviction is “a signal that the judiciary is becoming more independent and that the rule of law is maturing. This is a far bigger development for the economy than any deep-water oil discovery or bumper crop in soybeans.”

It looks like enforcing the law in Brazil is good for business and for the country’s investment climate. And that, in turn, will mean more economic freedom for Brazilians.