RIO DE JANEIRO (AFP) - Brazil's President Dilma Rousseff will face Social Democrat Aecio Neves in a run-off election, after edging out environmentalist Marina Silva in Sunday's vote.
With nearly all ballots counted, the leftist incumbent had 42 per cent of the vote to 34 per cent for business-world favourite Mr Neves, who fended off the once unstoppable-looking Ms Silva to reach the Oct 26 run-off.
After a campaign packed with all the twists and turns of a telenovela - a candidate's death in a fiery plane crash, a poor maid's rise to the cusp of the presidency, a seedy oil scandal - the election produced a traditional-looking second round between the two parties that have led the world's seventh-largest economy for the past 20 years.
But Mr Neves, a former governor and the scion of a political dynasty, vowed to carry the mantel of "change", the buzzword of the campaign after four years of economic slowdown, corruption allegations and frustration with poor public services under Ms Rousseff.
He made an emotional appeal to Ms Silva's Socialist party supporters, whose electoral race was thrown into turmoil on August 13 when their original candidate, Mr Eduardo Campos, was killed in a plane crash.
Ms Silva, his running mate, took Mr Campos's place and initially leapt in the polls with her broad-based appeal, promising to be Brazil's first "poor, black" president.
But despite her compelling personal story - a one-time maid, she rose from illiteracy and poverty to become a respected conservation activist, senator and environment minister - she lost steam in the last month of the campaign and finished on about 21 per cent.
After paying homage to Mr Campos, "a friend and honored public servant", Mr Neves, 54, told Socialist supporters: "It's time to unite our forces."
The photogenic husband of a former model, he will now try to extend his streak of charmed luck to the run-off, where Ms Rousseff is projected to beat him by more than 5 percentage points, according to the latest opinion polls.
Ms Silva, a former PT stalwart who remains close with some in the party, did not rush to endorse anyone.
"Brazil has clearly signalled it is not for the status quo," she said.
"We have an alliance with various parties and will take a decision jointly, maintaining what unites us - our programme."
Ms Rousseff for her part, predicted victory in the second round.
"The fight continues and we shall win," she told supporters in Brasilia.
The election, the closest in a generation for Latin America's largest democracy, is widely seen as a referendum on 12 years of Ms Rousseff's Workers' Party (PT).
The party endeared itself to the masses with landmark social programmes 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 Ms 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, health care and transport.
Ms 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 Mr Neves sharply condemned Ms Rousseff's handling of the economy, accusing her and her popular PT predecessor Luiz Inacio Lula da Silva of frightening off investors and "demonizing" the idea of public-private partnership.
Political analyst Andre Cesar predicted a close second round.
"Neves, who looked condemned to the shadows a month ago in the face of Silva and Rousseff's dominance in the polls, arose from the ashes and surprised with much better support than expected," he said.
"That means he arrives much stronger for the second round, which will be fought vote by vote."
Besides choosing their next president, voters also elected 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.