SÃO PAULO, Brazil — The former president of Brazil, Luiz Inácio Lula da Silva, was released last Friday after a year and a half in prison. Mr. da Silva, who is still facing pending charges, could well find himself back in prison, but for now he will be able to remain free until all his appeals are exhausted. Given the unpopularity of the current president, Jair Bolsonaro, the liberation of the most beloved and hated man in Brazil threatens to further deepen political tension.

The Workers’ Party has floundered since Mr. da Silva was imprisoned in April 2018. And yet no other politician has managed to come to the fore while in prison as he has. With his charismatic rhetoric and his track record as one of the most popular presidents in Brazilian history, he remains the only opposition figure capable of mobilizing the masses.

Paradoxically, until now the only opposition Mr. Bolsonaro’s presidency has faced has come largely from within his own party. Mr. da Silva and his allies hope to invigorate the Workers’ Party — the country’s most important opposition force. Now that he is free, the party can focus its efforts on counterbalancing Mr. Bolsonaro , the extreme-right former congressman elected last year.

Mr. da Silva remained a front-runner in the 2018 presidential election even after he was jailed. When his impending release was announced this past Friday, hundreds of supporters stood outside the federal police building in Curitiba, the capital of Paraná, celebrating. The following day in São Paulo, just as on the day he was imprisoned, thousands of people gathered at the Metalworkers’ Union, where Lula began his career as a union leader in the 1970s. “I’m back,” he said. “I have more will to fight than when I left here.”