Judge Sérgio Moro has agreed to be the justice and public security minister in Brazil’s new administration. (Mauro Pimentel/AFP/Getty Images)

Sérgio Moro, a judge who presided over an ongoing corruption crackdown that decimated Brazil’s political establishment and paved the way for Jair Bolsonaro’s victory in last week’s election, on Thursday accepted the post of justice and public security minister in the new administration.

“The prospect of implementing strong policies against corruption and organized crime, while respecting the constitution, the law and rights, brought me to this decision,” Moro said in a statement.

But his appointment has sparked an outcry, with critics saying it taints the four-year-old corruption probe as politically motivated.

Moro, 46, became a household name in 2014 for holding Brazil’s rich and powerful accountable for corruption and racketeering. He was the main judge responsible for deciding cases in what has become the largest corruption probe in Brazilian history. Operation Car Wash uncovered a complex kickback scheme wherein large construction companies funneled bribes to top politicians in return for lucrative contracts and favorable legislation.

While politicians on both the right and the left were targeted in the investigation, prosecutors argued that former president Luiz Inácio Lula da Silvaand the then-ruling Workers’ Party were at the center of the scheme.

Last year, Moro found Lula guilty of corruption and money laundering as part of the investigation. In April, he sent Lula to jail to serve a 12-year sentence after his appeals were denied, a move that plucked him out of a presidential race in which he was the front-runner and cleared a path to the presidency for Bolsonaro, a fringe politician from a tiny party. Lula and many of his supporters called the investigation a politically motivated witch hunt to remove him from the race.

The scale of corruption uncovered by the investigation fueled public outrage. Thousands took to the streets denouncing the Workers’ Party and calling for a change in leadership. That anger lifted Bolsonaro’s campaign and doomed his rival, Lula stand-in Fernando Haddad.

Throughout the campaign, Bolsonaro had sought to associate himself with Moro, using the judge’s name and image in political ads and vowing to continue his fight against corruption.

“We agreed on 100 percent, everything. It’s not the Bolsonaro campaign that wins, Brazil wins with a heavyweight on this issue,” Bolsonaro told reporters outside his home on Thursday.

As minister of justice and public security, Moro will be entrusted with fixing the two issues that Brazilians most care about: crime and corruption.

Yet observers worry that the appointment could undermine the ongoing and sprawling corruption investigation. Moro has stepped away from the probe and will no longer try cases, including the remaining ones involving Lula.

“It’s a risky move,” said Alexandre Bandeira, a political strategist in Brasilia. “It can give ammunition to the rumors that Car Wash was a political arrangement to pull Lula from the election.”

For years, Moro said he would never enter politics and presented himself as being above the political fray. “I am a man of justice, and, no offense, I am not a man of politics,” he said in a 2016 interview. “I am of another reality, another career track, another profile. That risk will never exist.”

Lula’s allies denounced Moro’s appointment as proof that the corruption investigation has unfairly targeted the former president.

“Fraud of the century!” tweeted Gleisi Hoffmann, a senior member of the Workers’ Party. “Judge Sergio Moro will be Minister of Justice in Jair Bolsonaro’s Government, who has only got elected because Lula was unfairly convicted and prevented from participating in the elections . . . by judge Sergio Moro. Helped to elect, helping to govern.”

Still, others welcomed the news that Moro, an expert on corruption and money laundering, would be given a broader platform.

“Sergio Moro is a moral asset to Brazil,” a Bolsonaro ally and the governor-elect of Sao Paulo, João Doria, said in a statement. “Having Judge Moro as Minister of Justice and Public Security will make Bolsonaro’s government even more dignified and signal a new path of transparency and honesty in Brazilian politics.”