RIO DE JANEIRO -- The Brazilian judge at the centre of one of the largest corruption investigations in history said Thursday he would become justice minister in the government of President-elect Jair Bolsonaro, a decision that will be hailed by Brazilians eager for a crackdown on graft but also add to deep polarization after a bruising presidential campaign.

Moro is wildly popular among conservatives and loathed by many on the left, so his decision to join the incoming administration will feed the suspicion of many Brazilians that the judge was politically biased in jailing ex-President Luiz Inacio da Silva, a conviction that forced the poll-leading leftist out of the presidential race.

Moro met with Bolsonaro at the president-elect's home in Rio de Janeiro on Thursday. Upon emerging, Moro did not speak to reporters but soon put out a statement confirming he had accepted an offer to lead both the justice and public security ministries, which will be combined in Bolsonaro's government.

Moro said it would be hard to give up being a federal judge after 22 years, but he saw an opportunity to "implement a strong agenda of anti-corruption and anti-organized crime" in his new role.

"In practice, this will mean consolidating the advancements against crime and corruption the last years and remove any risks of going backward," he wrote.

He added that the sprawling "Car Wash" investigation would continue in the hands of local judges in the southern city of Curitiba, where Moro lives and many of the cases have been tried. He also said he would provide more details on his new role next week.

Launched in 2014, the "Car Wash" probe uncovered elaborate schemes in which construction companies received bloated contracts and then kicked back billions of dollars in bribes to politicians and other government officials over more than a decade.

The level of corruption was breathtaking for Brazilians long inured to graft, and the scandal has reverberated across several Latin American countries where Odebrecht, one of the companies at the centre of the scandal, did business.

The investigation has led to the jailing of many of the country's biggest names. That list includes da Silva, convicted by Moro of corruption for trading favours with construction company Grupo OAS for the promise of a beachfront apartment. Da Silva began serving a 12-year sentence in April.

The cases made Moro a wildly popular figure with Brazilians exhausted by numerous stories of politicians plundering government coffers; Earlier this year, he tracked highly in presidential polls even though the judge, quiet and wonky, never expressed interest in running.

However, many of his tactics have been highly controversial, such as the use of extended pre-trial detentions and plea bargains, both aimed at getting high-profile suspects to talk.

On social media Thursday, many Brazilians shared a 2016 story in daily Estadao, which quoted Moro saying he had no political ambitions.

"No, never. Never," he said when asked about running for office or getting into politics. "I am a man of the justice system."

Moro has been accused of being partisan, with supporters of da Silva and the left-leaning Workers' Party claiming Moro was at the centre of a conspiracy to keep da Silva, who Brazilians call Lula, from running for president this year. Even after being jailed, da Silva led preference polls. In September, his candidacy was barred.

"Moro will become Bolsonaro's minister after having a decisive role in his election (victory) by impeding Lula from running," tweeted Gleisi Hoffman, chairwoman of da Silva's Workers' Party, adding: "He helped elect. Now he'll help govern."

In reality, Moro has convicted politicians from across the political spectrum. But he has also made decisions that many interpret as biased, such as releasing wiretapped conversations between da Silva and then President Dilma Rousseff in 2016.

For Bolsonaro, a former army captain who ran on promises to crack down on graft and rising crime, landing Moro is a huge boon. Moro, who studied law in Brazil and did a special program at Harvard University, has received numerous awards and honorary degrees related to his work. He frequently speaks in the United States and other countries, and is arguably the world's most famous anti-corruption crusader.

Bolsonaro told reporters outside his home late Thursday that Moro had asked for "total liberty" to operate, and he would have it.

Still, the decision comes with huge risks, both for Moro personally -- he now will become "political" as part of an administration -- and the future of the "Car Wash" investigations.

Members of the "Car Wash" task force have said much work remains, but it's hard to imagine any judge having the gravitas of Moro, who rose to fame because of his ability to sort through complicated white-collar crimes and write decisions that are rarely overturned.

In leading the combined ministries of justice and public security, Moro will be ultimately responsible for areas that include intractable problems, such as security. Last year, nearly 64,000 people were killed in Brazil, a record for the country that has long been the world leader in annual homicides.

Moro will oersee the federal police, highway police, the penitentiary system, immigration and several other agencies that in total encompass thousands of employees.

"Moro is making a complicated bet" in taking on a political role, said Mauricio Santoro, a political science professor at the State University of Rio de Janeiro. "Every government in the world has corruption. How will Moro deal with that? What will he do?"