The head of Brazil’s state-run oil company Petroleo Brasileiro SA, or Petrobras, has resigned after the biggest corruption scandal in the company’s history. Though nobody expected 2015 to be a particularly stellar year for Brazil’s struggling economy, analysts say the scandal may have pushed the country to the edge of recession.

“The Petrobras corruption scandal is incredibly serious, both for its importance to the economy and for its deep ties with the government and private sector,” said Shannon O’Neil, a senior fellow for Latin America Studies at the Council on Foreign Relations.

The scandal came to light after a former Petrobras executive was arrested last year and handed over $25 million he had hidden in offshore accounts. He said the ill-gotten gains came from a bribery scheme that funneled proceeds to employees and members of Rousseff’s Workers Party,  the New York Times reported.

Petrobras share prices have plummeted 64.5 percent since September. And when Petrobras has problems, Brazil has problems.

“Where it likely can do the most damage is to the government’s ability to act and implement much-needed structural reforms, particularly if other high-ranking officials are named in the widening scandal,” O’Neil said.

Rousseff was already on unsteady ground. She won re-election in October with just 51 percent of the vote. But now, experts say a divided government will be unable to make the economic choices Brazil desperately needs.

Brazil is highly dependent on foreign capital inflows, and investment was one of the matters Finance Minister Joaquim Levy told the Wall Street Journal would be a priority this year, as the country tries to shrink its $3.174 billion trade deficit.

Fitch Ratings cut Petrobras’s credit rating to BBB- this week, while Moody’s Investors Service downgraded it to an equally low level on Jan. 29, as Bloomberg reported. Now that its status is slightly above junk, the company, and Brazil, shouldn’t expect a lot of investment this year.

“Everybody was expecting 2015 to be tougher, and some were expecting some delays in infrastructure investment as the government tries to shore up its finances,” said Pablo Gonzalez, senior Brazil analyst at Frontier Strategy Group, which advises companies working overseas. “But nobody expected the magnitude of the Petrobras scandal and all the collateral effects it’s going to have.”

The investigation also involves a handful of the country’s biggest construction companies, which are accused of paying bribes for contracts. These firms won’t be working as much as they were, which could cause a serious slowdown in any planned projects. But the damage isn’t limited to the parties directly involved.

“It could cascade down in many different ways,” Gonzalez said. “The direct effect is less investment and less GDP growth, but there are indirect effects too. It’s a vicious cycle.”

And these consequences will quickly hit to people who aren’t even involved. Less investment in the oil and gas sector means fewer infrastructure projects and fewer jobs. Consumer confidence, which is already low after Brazilian lawmakers increased taxes last year, will also take a hit as things get more expensive.

In January, Brazilian economists predicted that the country’s GDP could grow by just 0.5 percent this year, after an estimated 0.15 percent expansion in 2014. But after the scandal that prediction looks shaky. São Paulo's Bovespa stock index lost roughly $5.4 billion when it fell almost 1.9 percent on Wednesday on reaction to the news.

“I don’t think the economic outlook for Brazil is very good,” said Barry Bosworth, economist at the Brookings Institution. He noted that the country has a relatively weak manufacturing sector, and predicted that exports will decline as global oil and commodity prices continue to fall this year.