Federal judge Sergio Moro, who is presiding over cases in a huge corruption scandal in Brazil known as “Car Wash.” (Fotoarena/Sipa USA)

The most admired figures in Brazil are usually colorful or glamorous — people such as soccer star Neymar Junior or Brazilian supermodel Gisele Bundchen. But this year’s hero is a dark-suited, soft-spoken federal judge who is, according to one of his closest friends, “a nerd.”

Sergio Moro has become a household name for his work presiding over a series of trials in an enormous corruption scandal. Nicknamed “Car Wash,” the scandal has shaken some of Brazil’s most important institutions, including its state-controlled oil company Petrobras and the Workers’ Party that has governed the country for 12 years.

Moro has jailed former politicians and executives from some of Brazil’s biggest companies in connection with the scandal, which threatens the deeply unpopular government of President Dilma Rousseff.

When Brazilians flooded the streets to protest corruption and call for Rousseff’s impeachment on four occasions this year, many wore Moro masks, waved banners with his name or carried inflatable Moro dolls.

Moro plays down the accolades. “The judge, as you all know, only judges following the law, following the facts and following the evidence,” he told an audience in Curitiba in southern Brazil earlier this year as he received an award from a business association.

The Car Wash investigation, which began in March 2014 and is run by a task force of prosecutors in Curitiba, found that contractors paid kickbacks to middlemen and politicians in exchange for contracts at Petrobras. As a result of the revelations, the company has had to write off $2 billion in bribery-related costs and slash investments. The impact of the scandal on Brazil’s giant oil company and its suppliers is so huge that it has helped plunge the countryinto recession.

In the capital, Brasilia, a separate team of prosecutors is investigating dozens of lawmakers in connection with the scheme, including Eduardo Cunha, speaker of Brazil’s Chamber of Deputies. Prosecutors said that he and his family had millions of dollars in Swiss bank accounts.

Gustavo de Oliveira, a law professor at the University of São Paulo who teaches a corruption course, said Moro’s work is transforming what had been widespread indifference to the problem of graft in Brazil.

“It is bringing a very significant change of values in Brazilian society,” he said.

Moro has changed the way corruption cases are tried, de Oliveira said, speeding up the processes and making liberal use of pretrial detentions to keep defendants sweating in jail instead of out on bail. As a result, many of them have opted to turn state’s evidence, a procedure that had been uncommon in Brazil.

The scale of the corruption only became clear to authorities after high-ranking Petrobras executive Paulo Costa and money launderer Alberto Youssef cut collaboration deals with the prosecution. The Car Wash investigation has resulted in the jailing of more than 100 people, and as of November prosecutors had recovered more than $3 billion in bribes.

But the methods used in the investigation and in Moro’s court are controversial. Ives Gandra Martins, a lawyer and professor at São Paulo’s Mackenzie University, said Moro has employed “mental torture” to pressure suspects to reach plea deals, contravening the constitution, which guarantees a “full defense” to those accused.

“If you jail a person, and this person will stay jailed until they do a state’s evidence deal, the tendency . . . is at one point to go for collaboration,” Martins said.

Nabor Bulhoes, a lawyer for Odebrecht, one of Brazil’s biggest conglomerates, whose chief executive Marcelo Odebrecht has been imprisoned since June on pretrial detention orders connected to the investigation, said Moro is not impartial.

“He begins with the assumption that everyone is guilty,” Bulhoes said.

A ‘very present sense of justice’

Friends and colleagues say Moro is unusual in a number of ways. He is deeply moral and works extremely hard, paying obsessive attention to detail, they say. And his legal background makes him uniquely prepared to judge the cases.

Anderson Furlan, 40, a federal judge and close friend of Moro’s, studied law with him in Maringa, a city in this state of Paraná where both grew up. Furlan said that throughout his career, Moro had showed a “very present sense of justice” — in one case ruling that the disabled should earn the same benefits as pensioners. In another, Moro was courageous enough to jail people connected to a notorious drug ring, which resulted in his receiving police protection, Furlan said.

“In all the decisions, there is a sense of fixing what is wrong to build a more just, more equal society,” Furlan said.

Paulo Souza, 47, studied with Moro and later shared a bachelor apartment with him in Curitiba. Souza said Moro never cheated, unlike other students in Brazilian universities, and did the mandatory military service that many men dodge.

“He is very correct. He always insisted on being so,” Souza said. (Moro is now married to a lawyer, and they have two children.)

Lawyer Carlos Zuculotto, 49, meets on weekends with Moro to smoke cigars. He said Moro once told him he wanted to do something in his professional life that “brings great benefits for society."

But Moro also had the legal background to handle a case as big and complex as this.

He has tried numerous money-laundering cases and wrote a book on the subject. In one case, in 2004, Moro handed out jail sentences to 14 former executives of the Banestado bank as part of a sprawling investigation that involved $30 billion being sent abroad from 1996 to 2002.

In 2013, Brazil’s Supreme Court jailed high-profile politicians from Rousseff’s Workers’ Party in a major vote-buying scheme. Moro acted as an assistant to one of the judges involved in the case, Rosa Weber.

Under Brazilian law, plea deals are unusual, in part because defendants often have multiple opportunities to appeal. Defendants are considered guilty only after every legal recourse has been exhausted — a system established in part to protect against the kind of abuses that occurred under the 1964-1985 military dictatorship — and they can remain at liberty while the process winds on.

Sometimes, the legal processes go on so long that the statute of limitations runs out on the crime. That happened to eight of the people Moro sentenced in the Banestado case. Since then, law professor de Oliveira said, Brazilian law has been changed to make it easier to judge financial crimes and use pretrial detentions.

Moro has said he learned from foreign corruption investigations, such as Italy’s “Clean Hands” case of the 1990s, which exposed kickbacks in state contracts. His approach also may have been influenced by his exposure to the U.S. legal process, friends say. In 1998, Moro and Gisele Lemke, a fellow federal judge, spent a month in a special program at the Harvard Law School. In 2007, Moro participated in a three-week course for potential leaders sponsored by the U.S. Department of State. Zuculotto said Moro admires the rigor and efficiency of the U.S. justice system.

“He is passing on an experience of American culture, how lawyers there behave in processes like this,” Zuculotto said.

Brazil’s president says, ‘I’m not guilty,’ but even allies wonder if she can survive

Brazil’s ruling party wonders how it lost its populist touch

In Rio, Olympic ambitions, but a bottom-line conscience