Thousands of Brazilians joined demonstrations across the country Sunday to urge that the government keep pursuing a mammoth corruption investigation and to show support for the justice minister, who has been hit with allegations he abused his powers as a judge overseeing the probe.

The protesters also urged President Jair Bolsonaro to reject recently passed legislation that would impose prison time for officials who obtain evidence by unlawful means.

Marchers carried posters backing Justice Minister Sergio Moro, who is widely popular with many Brazilians for leading the "Car Wash" corruption investigation that has upended the country's political elite and sent dozens of people in prison.

A man wearing a prison costume and mask of Brazil's former President Luiz Inacio Lula da Silva poses for photos with anther person grasping his neck, during a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Da Silvia is currently serving a prison sentence for corruption. (AP PhotoSilvia Izquierdo)

A man wearing a prison costume and mask of Brazil's former President Luiz Inacio Lula da Silva poses for photos with anther person grasping his neck, during a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Da Silvia is currently serving a prison sentence for corruption. (AP PhotoSilvia Izquierdo)

"We want to stop the process that exists against 'Car Wash,'" said Sergio Bruno, one of the organizers of a demonstration at Rio de Janeiro's Copacabana beach.

But Moro also is vilified by many on the left for putting former President Luiz Inácio Lula da Silva in jail on a corruption conviction that arose from the probe. That kept Da Silva from running last year's presidential election, which was won by the far-right Bolsonaro.

Reports by the website The Intercept since June have used leaked transcripts of hacked cellphone conversations to raise questions about whether Moro as a judge improperly worked with prosecutors in the case against Da Silva. Moro has denied wrongdoing.

Army veterans attend a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Supporters of the president and the justice minister called for the nationwide demonstration. (AP PhotoSilvia Izquierdo)

Army veterans attend a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Supporters of the president and the justice minister called for the nationwide demonstration. (AP PhotoSilvia Izquierdo)

Earlier this month, Brazil's Congress approved "abuse of authority" legislation that sets punishments for judges and prosecutors who obtain evidence unlawfully, disclose confidential information from a probe or initiating an investigation of someone without evidence they may have committed a crime. The measure has been sent to Bolsonaro, who must approve it for it to become law.

Attorney General Raquel Dodge has recommended that the president reject at least some of the legislation, saying it "could intimidate judges and prosecutors in the performance" of their duties.

A woman shouts slogans against corruption during a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Supporters of the president and the justice minister called for the nationwide demonstration. (AP PhotoSilvia Izquierdo)

A woman shouts slogans against corruption during a rally in support of the government's "Car Wash" investigation into corruption on Copacabana beach, Rio de Janeiro, Brazil, Sunday, Aug. 25, 2019. Supporters of the president and the justice minister called for the nationwide demonstration. (AP PhotoSilvia Izquierdo)