Polls show that Mr. da Silva still commands by far more support than any other Brazilian politician. His imprisonment, though, makes it most unlikely — though not impossible — that he will be able to run for president in October. His defense team hopes that the Supreme Court will rule that jailing him before he had exhausted his appeals was unconstitutional, but other investigations against him are underway.

That leaves the field, and the future, wide open. Without Mr. da Silva, the left has begun to fragment. His successor as president, Dilma Rousseff, was impeached for breaking budget rules; her successor, Michel Temer, the current president, has been charged with corruption and his popularity rating is near zero. Left to its own devices, the Congress is not likely to support any anti-corruption drive. About a third of the legislators face legal challenges but are effectively protected by a Constitution under which high officials and politicians can be tried only in the high courts, which move slowly and rarely convict. For all the successes of Operation Car Wash, nothing has been done to fix the judicial system. The danger of a lurch to populism and political radicalization is obvious.

However painful and disheartening the fall of a charismatic and dynamic leader, and however exhausted Brazilians must be from the political havoc of recent years, this is not the time to give up. History shows that battling corruption takes years, but also that incremental successes do change norms. Judges like Sérgio Moro, who has courageously led the prosecution in Operation Car Wash, have demonstrated that Brazil does have the institutions and means to take on even the most powerful — and most popular — of malefactors.

There are still six months to go before the national elections. They should be spent in search of a leader who can ensure that the gains against corruption are not setbacks for democracy.