F OR FIVE years Lava Jato (Car Wash), a sprawling anti-corruption investigation, has dominated headlines in Brazil. It ended political careers, led to the lockingup of company bosses and helped make possible last year the election of Jair Bolsonaro, a low-ranking right-wing congressman, to Brazil’s presidency. He fulminated against corruption during the campaign, but the investigation itself disappeared from the headlines. The arrest last month of Michel Temer, a former president, brought it back. Prosecutors say he ran a scheme that embezzled up to 1.8bn reais ($427m) over four decades, including during his presidency in 2016-18. Mr Temer denies the charges. A judge released him while the investigation continues.

Lava Jato began as a routine money-laundering case in the southern city of Curitiba. It led to revelations that construction companies had paid billions of dollars in bribes to politicians in exchange for lucrative contracts with Petrobras, the state-controlled oil company. Prosecutors in Curitiba have won convictions of 155 people, and prison sentences totalling more than 2,000 years. Luiz Inácio Lula da Silva, a former president from the left-wing Workers’ Party, is serving jail sentences totalling 25 years in the city. Investigations in Curitiba and in other cities have led to scores of convictions and billions of dollars in fines (see table overleaf). Brazilian prosecutors have helped foreign ones pursue related cases, especially in Peru. Mr Bolsonaro appointed Sérgio Moro, the judge who jailed Lula, to be his justice minister.

Through Lava Jato Brazilians have come to view systemic corruption as outrageous rather than inevitable. Citizens held massive demonstrations against it and voted corrupt politicians out of office. Businesses have created compliance departments. The supreme court banned corporate contributions to election campaigns and ruled that convicted criminals could be jailed after losing their first appeal (rather than remaining free until all their appeals were exhausted). Lava Jato has both encouraged and benefited from public anger. “Without society’s insistence, we wouldn’t have Lava Jato,” says Deltan Dallagnol, a prosecutor.

It grinds on. Hundreds of suspects besides Mr Temer await rulings from courts in Curitiba and other cities, where other corruption schemes are being investigated. But this sort of investigation “looks to the past”, says Silvana Batini, a prosecutor for Lava Jato’s task force in Rio.

Its future is uncertain. Mr Moro’s move from the courtroom to Mr Bolsonaro’s cabinet is a chance to strengthen anti-corruption laws and beef up enforcement. Yet Lava Jato faces new challenges, which could reverse the progress Brazil has made against political graft. One comes from congress, which could thwart Mr Moro’s attempts at reform. Another is that the supreme court, initially supportive of the investigation, has turned sceptical. That is partly in response to excesses by prosecutors and judges such as Mr Moro, and partly because of pressure from politicians.

A third threat is the demagogic response of Mr Bolsonaro’s supporters to such setbacks. They accuse the highest court of being in league with the velha política (old politics). One of Mr Bolsonaro’s sons, Eduardo, a federal deputy from São Paulo, said before the election that a “soldier and a corporal” could shut the court down. Taking a different tack, Mr Bolsonaro proposed doubling the number of justices, so he could pack it with his appointees. Such zealotry in defence of the rule of law could end up weakening it.

Lava Jato was born from two trends: the strengthening of Brazil’s judiciary and the weakening of its political system. A harbinger was the mensalão, a scandal during Lula’s presidency in 2005 that involved the government buying votes in congress. A new generation of prosecutors and judges won its spurs through trials of the miscreants. When Lava Jato began in 2014 judicial officials had new tools: agreements to share information on money-laundering with other countries; a law passed in 2010 that bans politicians with corruption convictions (such as Lula) from running for office; and, most important, a law from 2013 that expanded the use of plea bargaining. Without it, “we’d still be stuck going after money-launderers for 10,000 reais,” says Paulo Galvão, a Lava Jato prosecutor.

Politicians’ reputations sank. Brazilians’ anger about corruption and economic recession led to the impeachment of President Dilma Rousseff in 2016 (for budgetaccounting violations, not corruption). Mr Temer, her successor, spent political capital fending off corruption allegations. The prestige of the judiciary rose. It began to act as if it could “solve all of Brazil’s problems”, says Oscar Vilhena, the dean of the law school at Fundação Getulio Vargas ( FGV ).

Investigators, led by judges like Mr Moro, became more aggressive and less careful. They made liberal use of pre-trial detention and arrested suspects to force them to testify. Both practices are banned by the constitution in most circumstances. Whereas American prosecutors spent decades refining the practice of plea bargaining before using it to clobber mafia dons, its swift deployment in Lava Jato was akin to “changing the tyre as you drive”, says Matthew Taylor of American University in Washington, DC .

The “ends-justify-the-means” attitude led to mistakes, says Heloísa Estellita, a former clerk of the supreme court. In 2016, in an apparent attempt to stop Ms Rousseff appointing Lula as minister, which would have shielded him from prosecution, Mr Moro leaked to the media taped conversations between them. That aroused suspicions among their supporters that the judge was targeting the left. Suspicion increased when he agreed to join the cabinet. In 2017 Lava Jato prosecutors gave immunity to two businessmen who claimed to have bribed Mr Temer. The information they provided was incomplete. It later emerged that one prosecutor was also working for the law firm defending them.

That error became Lava Jato’s “Trojan horse”, says Felipe Recondo, a founder of Jota, a news site that focuses on Brazil’s judiciary. It helped bring about a new confrontation within the judiciary, between Lava Jato operatives and the supreme court. Mr Bolsonaro and most Brazilians back the investigators. Politicians tend to root for the higher court. Much will depend on the outcome of that duel.

Many Brazilians regard the supreme court as an ally of corrupt politicians. In part that is because sitting politicians enjoy a right called foro privilegiado. This means that only the supreme court can try them for acts of corruption they commit while in office. The overburdened court almost never convicts. It heard 404 cases against politicians between 2011 and 2016 but issued guilty verdicts in just three. After the death in 2017 of one gung-ho justice and missteps by investigators, the court became more sceptical of Lava Jato.

The new bench has issued politician-friendly rulings. Some, like limits on plea bargaining and a ban on coercive questioning, corrected excesses. Others seemed arbitrary, like the release of a former minister who had been convicted of corruption and lost his first appeal. One justice, Gilmar Mendes, freed 19 defendants in 30 days in 2018. “The supreme court does not exist,” says Conrado Hübner Mendes, a law professor at the University of São Paulo. “There are 11 mouths and 11 pens.”

It will soon be at the centre of another controversy. It plans to reconsider its earlier ruling that people convicted of crimes can be jailed after they lose their first appeal. A reversal of that decision could result in the release of thousands of convicts not deemed a danger to society, including ordinary criminals. It could also undermine Lava Jato, investigators fear, by weakening suspects’ incentive to co-operate.

Such a decision could provoke popular as well as prosecutorial fury. It flared last month, when the supreme court ruled that electoral courts rather than criminal ones should deal with campaign-related corruption. Mr Bolsonaro’s supporters erupted. The hashtag ASoldierACorporal trended again. The episode shows that Brazilians are apt to back pseudo-cures for impunity rather than the surer but slower remedy of building institutions. “We are living in a populist Brazil, which is challenging for the rule of law,” says Ms Estellita.

Institution-builders are looking to Mr Moro. He says he accepted the job in Mr Bolsonaro’s cabinet to ensure that Lava Jato does not end up like Italy’s “clean hands” investigations of the 1990s, which implicated a lot of politicians without changing the system. Mr Moro brought to his first meeting with Mr Bolsonaro a 624-page document called “New Measures Against Corruption”, drawn up by FGV and Transparency International, a watchdog.

But politics may limit Mr Moro’s ambitions. His first anti-crime bill has some valuable ideas, including protection for whistleblowers and a longer statute of limitations for corruption. But it leaves out many useful anti-graft measures, such as ending foro privilegiado. Congressional resistance forced him to delay a proposal to criminalise illegal campaign donations.

Now the Bolsonaro family itself is facing scrutiny from investigators, which may cool its enthusiasm for graft-busting. In January another of the president’s sons, Flávio, a senator from Rio de Janeiro, tried to claim foro privilegiado to avoid an inquiry into suspicious transactions recorded in the bank account of his driver. If such scandals multiply, Lava Jato’s most vociferous allies could become its worst enemies.