A man searches where to vote at a polling station in Sao Paulo, Brazil on October 5, 2014, during general elections
Rio de Janeiro (AFP) - Brazilian President Dilma Rousseff is set to face Social Democrat Aecio Neves in a run-off election, leaving popular environmentalist Marina Silva out of the race, according to partial results and an exit poll Sunday.
With 88 percent of the ballots counted, Rousseff had 40.7 percent of the vote and Neves 34.7 percent, said the Supreme Electoral Tribunal (TSE).
That left Silva, a one-time maid whose meteoric rise looked set to make her multi-racial Brazil's first black president just one month ago, on track to be eliminated from the race with 21 percent.
Neves, the scion of a political dynasty and business-world favorite, meanwhile survived a turbulent campaign that nearly relegated him to the dustbin of also-rans to reach a likely October 26 run-off against the incumbent, whose management of the world's seventh-largest economy he has sharply criticized.
The partial official results were backed up by an exit poll by survey firm Ibope, which gave the incumbent 44 percent, Neves 30 and Silva 22.
The race for the second spot in the run-off went down to the wire, with Neves, a popular ex-governor and handsome husband of a former model, battling back from third place to keep his presidential hopes alive.
Silva meanwhile suffered a spectacular setback from her whirlwind late entry into the race.
Silva, a one-time maid who vowed to be Brazil's first "poor, black president," upended the race when she replaced the Socialist Party's original candidate, Eduardo Campos, after he was killed in a plane crash on August 13.
Soaring in the polls, she was initially forecast to beat Rousseff in a runoff.
But Rousseff and Neves steadily reversed her lead, with the latter pulling ahead of her for the first time in the final three polls, released Saturday.
The same polls found Rousseff would defeat Neves in a run-off by more than five percentage points.
- Referendum on PT rule -
The election, the closest in a generation for Latin America's largest democracy, is widely seen as a referendum on 12 years of Rousseff's Workers' Party (PT).
The party endeared itself to the masses with landmark social programs and an economic boom in the 2000s that have lifted 40 million Brazilians from poverty, increased wages and brought unemployment to a near-record low.
But Rousseff, 66, has presided over rising inflation and, since January, a recession, as well as million-strong protests last year against corruption and poor education, healthcare and transport.
Rousseff, a former guerrilla who was jailed and tortured for fighting the country's 1964-1985 dictatorship, has also been battered in recent weeks by a corruption scandal implicating dozens of politicians -- mainly her allies -- at state-owned oil giant Petrobras.
All the main candidates vowed to protect the PT's popular welfare programs.
But they disagreed on how to kickstart the economy and bring the "change" that was the buzzword of the election.
Even the incumbent vowed to "continue delivering the change Brazil needs" as she cast her ballot in the southern city of Porto Alegre.
Neves, 54, the grandson of former prime minister Tancredo Neves, for his part had his eye on the second round as he cast his ballot in his native Belo Horizonte.
He was nonchalant about his comeback in the polls, saying: "It happened naturally. It wasn't a surprise. I'm relaxed."
- Floating polling stations -
More than 142 million Brazilians are registered for the polls, and voting is compulsory.
The sprawling country has even set up floating polling stations in the Amazon where voters cast ballots with a fingerprint, to be beamed by satellite to electoral authorities.
"I hope the country improves. We're always changing policies, but the country never gets better," said fisherman Antonio Lopes da Silva, 33, after paddling his canoe to go vote.
Nearly 3,000 kilometers (more than 1,500 miles) away, in industrial mega-city Sao Paulo, hospital worker Eliana Veracruz, 60, said she was voting for the PT "because of all they've done for me, even if I'm afraid the current economic situation is affecting us."
Lounging on the beach with a book in Rio de Janeiro, Barbara Souza, 37, said she was fed up with the PT but had wavered about whom to vote for.
"I was going to vote for Marina, but in the end I voted for Aecio just because of the polls. I voted for him because he's got a better chance of beating Dilma," she said.
Besides choosing their next president, voters were also electing 27 governors, 513 congressmen and 1,069 regional lawmakers, as well as a third of the senate -- with a total of more than 26,000 candidates to choose from.