On the surface, it could not be much worse for Brazil. With the economy faltering, the nation’s cherished
government-controlled oil company Petrobras spiraled into a $3.8 billion corruption scandal just as it was finally ramping up production in its vast deep-water reserves.

Since the unfolding corruption investigation became public in March, charges have been filed against 91 people, including executives from Petrobras and some of Brazil’s biggest construction and engineering companies. And it’s not over. On Friday, the Estado de S. Paulo newspaper was the latest publication to name politicians it said were linked to the scheme.

Prosecutors say that Petrobras executives, including Paulo Costa, the former director of the supply department who has turned state’s evidence, collected 1 to 5 percent bribes on fattened contracts and that contractors from six companies formed a “club” to fix Petrobras bids. The newspaper’s Web site named 28 politicians, mostly from the ruling Workers’ Party and its coalition allies, who according to Costa benefited from the scheme — accusations that were denied.

Other executives also offered evidence, including ex-Petrobras manager Pedro Barusco, who has promised to return $100 million to the company.

For many Brazilians, the Big Oil scandal is a source of national shame. Yet it also is being viewed as a chance for Brazil to finally confront its endemic corruption.

“This is the moment when you show your real colors. You are ready to change,” said Alejandro Salas, regional director for the Americas at Transparency International in Berlin. “It’s a historic moment.”

First, Petrobras has to weather the storm. And Brazil has to jail the guilty. If that doesn’t happen, Salas said, “Brazil will be making a huge mistake.”

President Dilma Rousseff also has tried to present this as a pivotal moment. “It is time to enter into a great national pact against corruption, involving all sectors of society and spheres of government,” she said in a speech last week.

By law, Brazilian politicians must be tried by the country’s Supreme Court, which in 2013 jailed guilty politicians in a vote-buying scandal called the Mensalão, or Big Monthly Payment. The signs are that the court could be just as tough with Big Oil.

“The Brazilian political system is a refinery of evil,” Supreme Court Judge Luís Barroso said in an interview for the Josias de Souza political blog last week. “Politics can’t be a business.”

The unfolding investigation, dubbed Operation Car Wash, has caused extraordinary scenes at Petrobras’s Rio headquarters, where chief executive Graça Foster waits anxiously while Brazilian media name potential successors. Last week, the scandal dominated a breakfast news conference, organized at the last minute to replace the company’s traditional Christmas dinner for selected journalists.

There was little Christmas cheer. Instead, Foster was asked why she and her leading executives were still in their jobs when Brazil’s Federal Court of Accounts had for years sounded alerts on overspending on multibillion-dollar projects such as the Abreu e Lima oil refinery, whose contracts are central to Operation Car Wash accusations.

“Corruption. Money laundering. This appeared to us in March. It appeared to us with Operation Car Wash. I can’t tell you different,” Foster said. She said she had offered her resignation to Rousseff, a close friend, but was turned down. “We believe in the Petrobras project,” she said. “That is why we are sitting here.”

Foster deflected new allegations published this month in the business daily Valor. They were based on a series of e-mails Petrobras executive Venina Fonseca sent to Foster and other bosses — before and after she became chief executive in 2012 — denouncing irregularities in areas such as overrunning costs of the Abreu e Lima refinery.

There also are implications abroad. Petrobras trades on the New York Stock Exchange. As of Nov. 30, 22.8 percent of its capital stock was in shares traded in the United States. In an e-mail to The Washington Post last week, the company said it is collaborating with the U.S. Department of Justice and the Securities and Exchange Commission, both of which are believed to have opened investigations. If Petrobras is found to have broken U.S. law, the legal implications are potentially damaging.

They could range from an indictment to “some sort of non-prosecution or deferred prosecution agreement,” said Jason Flemmons, a senior managing director at New York consulting firm FTI, who worked in the SEC enforcement division for 12 years.

“The exposure here could run into the hundreds of millions of dollars,” said Jeffrey Lehtman, a partner at the Washington law firm Richards Kibbe & Orbe who specializes in corporate cross-border regulatory issues.

Petrobras has hired two law firms — one Brazilian, one American — to investigate the company and will appoint a new director to run a compliance department with freedom to go wherever necessary. “The company looks to be doing all the right things in response,” Flemmons said.

Meanwhile, Brazilians are wondering how far up the political ladder the revelations will go. Foster will be sacrificed, wrote Igor Gielow in a column for Folha de S. Paulo, just as Rousseff’s predecessor, Luiz Inácio Lula da Silva, sacrificed his chief of staff, José Dirceu, jailed in the Mensalão scandal.

“Lula escaped the Mensalão,” Gielow wrote. “Will he and Dilma now survive the Petrobras case?”

An interview Fonseca gave Sunday to the popular TV show “Fantastico” has increased the pressure on Foster, whom Rousseff defended Monday morning. Fonseca said she had denounced irregularities to Foster and other bosses since 2008. Although Fonseca said she was scared, she is providing testimony. “I will go to the end,” she said. Foster told Globo News on Monday that Fonseca had not been clear in her denunciations.

Paulo Sotero, director of the Brazil Institute at the Woodrow Wilson International Center for Scholars in Washington, said Operation Car Wash’s prosecutors, police and judges have correctly read the public mood that sent millions onto Brazilian streets to protest issues such as corruption in June 2013.

“It will continue to torment the president and the country for the foreseeable future. But this is what has to happen,” Sotero said. “The country will grow and become a much stronger country.”