Fernando Henrique Cardoso looks set to be easily re-elected Brazilian president tomorrow, although his greater test will come in the following weeks as he tries to save the world's ninth largest economy from crashing.
Brazil's election campaign has become a side-show to a financial crisis which has seen almost $20 billion leave the country in the last month as investors fear the currency, the real, will devalue.
A Brazilian devaluation could have globally devastating consequences because it will harm the rest of Latin America and perhaps the US, whose banks are twice as exposed to the region as they are to Russia.
Even though Mr Cardoso has raised interest rates to nearly 50 per cent in an attempt to stop the dollar outflow and has said he may be forced to raise taxes - austere measures that hit the pockets of many Brazilians - he is still away ahead in the polls.
He is expected to get 47 per cent of the vote compared with 24 per cent for his nearest challenger, Mr Luiz Inacio Lula da Silva, the Workers' Party candidate.
Mr Cardoso built his reputation on the Real Plan four years ago which eliminated hyperinflation of more than 3,000 per cent a year by creating a new currency tied to the dollar. His campaign has been based round maintaining the real's stability.
"With me inflation will not return," Mr Cardoso promised in his final television campaign message this week. "I'm not going to throw away . . . the support you have given me over the last four years by betraying your trust after the elections." The Real Plan relied on an influx of foreign currency brought into the country through a massive programme of privatisation, making Brazil the second largest destination for foreign investment after China.
But Russia's financial crisis this year sapped confidence in emerging markets, prompting investors to withdraw their money in droves. Economists believe only a global financial-aid package combined with aggressive budget-reduction measures can avert a devaluation.
Brazil's Achilles' heel is an unsustainable budget deficit of seven per cent. Analysts say Brazil's only chance to step back from the precipice is for Mr Cardoso to announce some serious belt-tightening constitutional reforms as soon as possible.
But he is unlikely to decide on any measures until after the second round of voting at the end of October for fear it will jeopardise his coalition's candidates in the closely-run battles for key state governorships. According to some economists that could be too late.
Brazil is the world's third largest democracy, after the US and India, and the logistics of the election are awesome. A fleet of helicopters, rivers barges and military aircraft are part of the arsenal election officials are using in a country that spreads from the Amazon rain forest to the megacity of Sao Paulo.
More than half the voters will vote at electronic ballot-boxes, where candidates are represented by numbers and pictures; so used because 20 per cent of adults are effectively illiterate.
Voting is obligatory for the 106 million people over the age of 18, while 16- and 17-year-olds are allowed to vote. The electorate has the choice of 30 parties at five levels: president, senator, federal deputy, governor and state deputy.