Special forces police use water cannons on March 18, 2016, to clear Paulista Avenue in Sao Paulo of protesters denouncing the appointment of former president Lula to a ministerial position. (Victor Moriyama/Getty Images)

With Brazil’s president and her predecessor embroiled in a growing corruption scandal, supporters of the governing Workers’ Party took to the streets in defiant rallies Friday.

President Dilma Rousseff’s mentor, former president Luiz ­Inácio Lula da Silva, gave a passionate speech while a huge crowd chanted his name in Sao Paulo. Lula, as he is known here, was one of Brazil’s most popular leaders when he left office in 2011. But he and Rousseff have been drawn into an investigation into billions of dollars in bribes and kickbacks on contracts at state-run oil company Petrobras.

On Friday, Rousseff said that aggressive tactics being used in the corruption investigation are threatening civil rights. “It is important we don’t go back in history,” she said in a clear allusion to the dictatorship that ruled Brazil for two decades until 1985.

Rousseff also faces an impeachment process based on accusations that she broke fiscal-responsibility laws, as well as an ­electoral-court investigation into whether her 2014 election campaign was funded with illicit money.

Pro-government demonstrators rallied in all of Brazil’s 26 states on Friday, with anti-government demonstrations staged in eight states. In Sao Paulo, tens of thousands of government supporters had flooded the streets by 6 p.m.

With Brazil’s president and her predecessor embroiled in a growing corruption scandal, supporters of the governing Workers’ Party took to the streets in rallies Friday and were joined by sympathizers arguing that recent escalations in the investigation threaten their young democracy. Correction: An earlier version of this video said that Brazil's President Dilma Rousseff is under investigation. She is not. Her predecessor Luiz ­Inácio Lula da Silva is. (Whitney Leaming,Thomas Johnson/The Washington Post)

As the scandal expands, Lula’s legacy as the successful, well-
regarded president whose social programs helped more than 30 million Brazilians emerge from poverty is at risk of being destroyed. Charges have been filed against him for money laundering and misrepresentation over a seaside apartment that investigators say was renovated for him by construction companies involved in the Petrobras scandal — though a judge needs to accept them. He also is being investigated in connection with repairs at a country estate. He denies the allegations.

The left-leaning party that Lula helped found is hanging on to power by a thread. On Sunday, at least half a million anti-government protesters poured into the streets of Sao Paulo’s landmark Paulista Avenue demanding Rousseff’s impeachment and Lula’s imprisonment. On Friday, 95,000 people flooded the same street to defend them, turning it into a sea of Workers’ Party red.

On Wednesday, Rousseff nominated Lula for a top cabinet post, a move widely seen as a bid to shield the former union leader against arrest. Making him a minister means he could be investigated only by the Supreme Court. Rousseff insisted that she was appointing Lula for his political abilities.

Sergio Moro, a crusading federal judge whose corruption investigations into Petrobras have led to the arrests of dozens of top political and business figures, responded to Lula’s appointment by releasing wiretap recordings of conversations the former president held with Rousseff and other left-wing politicians in recent weeks. Prosecutors say the talks showed Lula was trying to interfere with the investigations.

On Friday, Rousseff attacked the use of wiretaps. “This is something illicit,” she said. Moro denied that allegation.

The release of the conversations prompted angry street protests across the country on both sides of the issue. On Thursday night, riot police used stun grenades and tear gas on about 8,000 protesters outside the National Congress in Brasilia.

Two federal judges suspended Lula’s nomination as a minister, but their rulings were overturned. Then, on Friday, a Supreme Court judge suspended his nomination again — a decision that needs to be ratified by the whole court.

Unionists and members of the Workers Party demonstrate in support of former Brazilian president Luiz Inacio Lula da Silva in downtown Sao Paulo. (Nelson Almeida/AFP/Getty Images)

Protesters in Sao Paulo on Friday saw the release of the wire taps as an attack on democracy. “This was absurd,” said Lucas Leonidas, 20. “We have to defend democracy.” Lula led the crowd in a chant of “There will not be a coup.”

Though significant, numbers in Friday’s demonstrations were less than on March 13. But they showed the Workers’ Party is not going to relinquish power easily, said Paulo Baía, a professor of political science at the Federal University of Rio de Janeiro.

“They will fight until the end,” he said. “It reinforces the political polarization of the country.”