Rousseff Neves
Aecio Neves and Dilma Rousseff participate in a television debate in Sao Paulo, Oct. 14, 2014. Reuters/Paulo Whitaker

Brazilian voters will finally have their say this weekend after months of frenetic campaigning, heated exchanges and pointed accusations between embattled leftist incumbent Dilma Rousseff and business-friendly challenger Aecio Neves. While the two candidates continue to claw, a corruption scandal with potentially devastating consequences is threatening to upend the race.

Ugly details have been unfolding for weeks over a bribery and kickback scheme involving state-owned oil giant Petrobras and the Workers’ Party (PT), the political party of President Rousseff and her popular predecessor, Luiz Inacio "Lula" da Silva. A former executive of the oil company testified before a judge this month that he had accepted bribes on behalf of Petrobras to give lucrative contracts to dozens of construction companies, and handed over some of the cash to PT politicians and close allies.

The scandal reportedly involves as much as $4 billion and dozens of politicians. President Rousseff said she had no knowledge of the kickback scheme and has pledged to try to reimburse the funds. So far, the scandal doesn't seem to have affected the presidential race: Two of the latest polls show Rousseff gaining steam with a narrow lead over Neves.

But on Thursday evening, Brazilian weekly news magazine Veja reported that both Rousseff and Lula were aware of the deals being made from the start. The report was based on judicial testimony by Alberto Youseff, an associate of the Petrobras executive who was also implicated as a money launderer involved in the corruption scheme. Rousseff swung at Veja over the article Friday, accusing the magazine of “electoral terrorism.”

Analysts say it’s too soon to tell whether the allegations against Rousseff will register in Sunday’s vote. But Paulo Sotero, director of the Wilson Center’s Brazil Institute, said they pose serious challenges in an already toxic atmosphere.

“President Rousseff has a reputation as an honest person,” he said, noting that during her first year in office, she fired six ministers appointed by Lula for corruption. “If the allegations cannot be proved, I think we will have very bad repercussions in terms of press freedom in Brazil, and it would discredit the prosecutors and federal police.” Rousseff and her supporters say the timing of the accusations -- just days before the Sunday vote -- are evidence of political maneuvering. “But if the allegations are correct, I think that we are in for a process that could go as far as impeachment,” Sotero said.

The Petrobras affair looms over an already intense battle for Brazil’s future as the country grapples with economic stagnation and political disenchantment. Rousseff still has solid support among Brazil’s poor, bolstered by popular social programs such as the Bolsa Familia cash assistance pact and a dramatic reduction of poverty. But economic growth has remained at a standstill, prompting investors and Brazil’s business community to rally around the more market-friendly Neves.

Regardless of who wins on Sunday, tough times are ahead for the world’s seventh-largest economy.

“Brazil is economically and politically exhausted,” Sotero said. “This [election] will leave us divided, with an economy in a very difficult position and no clear indication of how you restore something that has not been there for the last couple of years -- which is confidence.”