1 of 12
Silvia Izquierdo, Associated Press
Residents enter a school where a mural of Brazil's late professional race driver Ayrton Senna covers the wall during general elections in the Rocinha slum in Rio de Janeiro, Brazil, Sunday, Oct. 5, 2014. Brazilians are casting ballots in a presidential election expected to force a three-week runoff campaign between incumbent Dilma Rousseff and one of her two top challengers. Brazilians are also deciding congressional races and electing governors.

RIO DE JANEIRO — Brazilians voted Sunday in the most unpredictable presidential election since the nation's return to democracy nearly three decades ago, a race pitting an incumbent who is surging against two deadlocked rivals fighting to make it to a runoff round.

President Dilma Rousseff held a commanding lead in polls despite an economy in recession. She was expected to easily beat her two main opposition contenders in a remarkable turnaround after trailing in surveys by 10 percentage points in late August. Since then, her long-ruling Workers' Party flexed its muscles and engaged in what some analysts called the most negative, aggressive campaign ever seen in Brazil.

The incumbent's aggressive campaigning eviscerated the support of former environment minister Marina Silva, who only entered the race in mid-August following a plane crash that killed her Socialist Party's original candidate.

It was thought Silva would tap into the widespread disdain Brazilians hold for the political class — anger that boiled over into roiling, nationwide anti-government protests last year. Opinion polls taken just after the demonstrations over a year ago indicated Silva was among the few political figures unscathed, given her squeaky clean reputation amid what voters say is a sea of corruption.

But Silva has not withstood a barrage of attacks labeling her as indecisive and without the mettle needed to lead the globe's fifth-largest nation — the message pounded on by Rousseff and the other top opposition candidate, Aecio Neves of the Social Democracy Party.

"Marina Silva tried but was not able to convey her message of change. She's only responding to attacks," said Paulo Sotero, director of the Brazil Institute at the Woodrow Wilson International Center for Scholars in Washington. "We've seen negative campaigning before, but never at this level of ferocity."

Rousseff's support rose to 46 percent in a survey released hours before the vote. But even the leader said it was unlikely she could push through to win the absolute majority required to avoid a second-round election on Oct. 26.

"I'm not operating with that idea; I'm working with the idea there will be a runoff," Rousseff said just before casting her vote in southern Brazil, where she lived for many years and first entered politics.

The race for second place between Silva and Neves, the former governor of Brazil's second-biggest state who comes from a storied political lineage, was deadlocked, though momentum clearly swung in Neves' favor in the past week as he gained support in surveys.

"The fear campaign that Dilma and her marketing people have set up against Marina Silva has had a strong effect," said David Fleischer, a political science professor at the University of Brasilia. "Dilma's people are saying Marina will abolish ... things they've gained through government social programs."

That's the heart of an apparent contradiction in the unpredictable campaign.

Opinion surveys indicate around 70 percent of Brazilians say they want change — as made plain by the mammoth anti-government protests last year blasting Brazil's woeful public services despite the nation's heavy tax burden.

Yet surveys also say nearly three-fourths of Brazilians express satisfaction with their lives.

"They want more of the same, and that is what Dilma is offering," Fleischer said.

During nearly 12 years in power, the Workers' Party has ushered in strong social programs that have helped lift millions out of poverty and into the middle class. Rousseff's strongest support comes from the poorest, those who are precariously hanging onto gains amid an economy that has sputtered the past four years.

"I don't think a sudden change would be good for the country. That could be dangerous," said Diego Almeida, a 26-year-old university student and resident of Rio's biggest slum who said he voted for Rousseff.

Still, he expressed the frustration millions of Brazilians have with their leaders: "They've had 500 years to fix this country and for 500 years they've failed. I just hope that something happens in the next 500 years."

Rousseff promised to expand social programs and continue strong state involvement in the economy, even though critics complain it creates a poor business environment and the main stock market tumbled every time a new poll showed her on the rise.

Both Silva and Neves offered more centrist economic approaches, such as central bank independence, more privatizations and the pursuit of trade deals with Europe and the United States.

After voting, Silva said she was "confident we will get to the second round. We put up a good fight and, God willing, we'll reach the runoff."

Neves said he was optimistic that he would be Rousseff's opponent in the second round. He said he'd "love to talk" to Silva about gaining her support.

Associated Press writers Jenny Barchfield in Rio de Janeiro and Stan Lehman in Sao Paulo contributed to this report. Brad Brooks on Twitter: www.twitter.com/bradleybrooks