Brazil's unpredictable election took another twist Sunday, with left-leaning President Dilma Rousseff being forced into a runoff race as expected, but against a center-right challenger who only surged in the final week of the campaign.

Rousseff will face Aecio Neves in the Oct. 26 runoff vote, required as no single candidate won an outright majority. With over 99 percent of the vote counted, the president had won 41.5 percent against Neves' 33.6 percent.

As surprising as Neves' rise was the fall from grace of another candidate, former environment minister Marina Silva, who took just 21 percent of the vote. In late August, she held a double-digit lead over Rousseff in polls after being thrust into the race when her Socialist Party's first candidate died in a plane crash.

But over the past three weeks, the powerful political machine of Rousseff's Workers' Party eviscerated Silva with what some analysts called the most negative and aggressive campaigning Brazil has seen since returning to democracy nearly 30 years ago. Silva fell hard in polls and could never regain her footing or get her message out.

Neves, however, had the backing of the well-organized Social Democracy Party, which held the presidency from 1994 until 2002, a period when Brazil tamed its hyperinflation and turned its economy around.

"Aecio's performance has been extraordinary and one of the reasons for this is the very strong party structure behind him -- a party with a strong nationwide presence and which has been in the presidency," said Carlos Pereira, a political analyst with the Gertulio Vargas Foundation, Brazil's leading think tank. "It is now a new election where everything is wide open. Aecio, who until recently no one believed had a chance, has emerged as a very strong candidate."

Neves is an economist and former two-term governor of Minas Gerais, Brazil's second-most populous state, where he left office in 2010 with an approval rating above 90 percent.

He has strong name recognition in Brazil. Neves began his political career at age 23 as the personal secretary to his grandfather, Tancredo Neves, a widely beloved figure who was chosen to become Brazil's first post-dictatorship president but fell ill and died before taking office.

Neves emphasized those family roots in a statement late Sunday.

"What I can say, what comes to mind, is what my grandfather Tancredo said 30 years ago when he won the elections for president of the republic: `We must not get dispersed. We are just in the middle of our path.' And I hope to be able to walk alongside every Brazilian who wants a dignified and efficient government to the end. I am going to fight for that," he said.

One year after his grandfather's death, Neves was elected to the first of four terms as congressman. The 54-year-old father of three also served one term as senator.

Neves' reputation took a hit in July, Brazil's biggest newspaper Folha de S.Paulo alleged Neves' government spent around $5.5 million to build an airport on land belonging to an uncle of the then-governor. Neves later contested the accusations in an editorial in the same newspaper.

Carlos Ernanny, a retired 68-year-old in Rio de Janeiro, said he voted for Neves out of "hope for our Brazil."

"His good sense, his moral compass gives me hope for economic growth and development," he said, a common refrain among Neves supporters because of his business-friendly, centrist stance.

As for the fall of Silva, it was Rousseff's aggressive campaigning that cut her support.

It was thought Silva could tap into the widespread disdain Brazilians hold for the political class -- anger that boiled over into roiling, nationwide anti-government protests last year.

But she couldn't withstand 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.

"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."

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 promises 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.

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