After a sluggish start, Brazil's presidential election — the first vote is Sunday — has shifted into a full-blown political roller coaster.
What was initially expected to be a coronation for President Dilma Rousseff has instead become one of the tightest and most ill-tempered races in the country's history.
Adding to the drama, the race is boiling down to a choice between two women whose rivalry is legendary.
Both of them served in the previous government of former president Luiz Inacio Lula de Silva. And, like Lula, each of them has a riveting backstory.
Lula's successor, Rousseff, is a famously short-tempered economist who was tortured during the military dictatorship in the 1970s, and quietly rose up the ranks as a competent, if not especially charismatic, manager.
Her main opponent, Marina Silva, is a workaholic former environment minister with a no-nonsense demeanor. She also happens to be black, the daughter of a dirt-poor rubber tapper from the Amazon and wildly popular.
Now, after harbouring what appeared to be an unassailable lead just a few months ago, Rousseff is suddenly looking beatable.
Her Workers' Party and other coalition partners are plagued by scandal, including revelations of mind-boggling corruption at the country's state oil company, Petrobras. The fact that Rousseff once oversaw the finances of that enterprise has hurt her politically.
Meanwhile, public support for Silva, who ran a respectable presidential campaign in 2010, garnering 20 million votes, has gathered steam.
Her diverse electoral base ranges from investment bankers to evangelicals and anti-establishment radicals, and stands the best chance of breaking the governing coalition's almost 12-year grip on power.
While the most recent opinion polls put Rousseff ahead of Silva, the sense here is that neither candidate will secure the 50 per cent necessary to be declared the outright winner on October 5.
As for the second round on October 26, after the two front-runners go head-to-head for three weeks, all bets are off.
The Silva lining
What makes this election especially dramatic is the unexpected nature of Silva's meteoric rise over the past six weeks.
After failing to register her own party (the Sustainability Network), she started the campaign as the running mate of Eduardo Campos, a promising candidate from the Brazilian Socialist Party (PSB) who had struggled to get traction.
But Campos was tragically killed on Aug. 13 after his plane crashed in bad weather, and Silva took over, a week later, as the party's official candidate.
The tragedy gave her immediate prominence, but Silva's surge also coincided with a sagging economy.
After four successive years of lower than expected GDP growth, Brazil slipped into a recession in the first half of 2014.
The country's change in fortunes (when compared to the bustling mid-2000s) can be partly attributed to a downturn in commodity prices.
But Rousseff stands accused of neglecting foreign policy and trade. And with inflation now nudging past the government's own target of six per cent, voters are clearly growing restless.
There are also signs that powerful establishment figures want Rousseff out.
Prominent businessmen are lining up behind Silva and the centre-right candidate, Aécio Neves from the Social Democracy Party (PSDB), who is third in the polls.
Even PSDB figureheads like former president Fernando Henrique Cardoso are hinting at accommodation with Silva if it will oust Rousseff from power. And analysts are predicting that 70 per cent of Neves supporters would back Silva in a second round.
But it is Silva's "outsider" status and her apparent willingness to shake things up that has electrified people, especially youth, across the country.
The Bovespa index of Brazil's largest firms soared 11 per cent earlier last month in the wake of Silva's surge in popularity.
Traders like her market-friendly pledges and commitment to getting bloated public expenditures under control.
In contrast, the country's currency and equity markets slumped earlier this week after the Rousseff campaign showed signs of rebounding.
Still, notwithstanding the considerable hype surrounding Silva, it would be wrong to count Rousseff and the Workers' Party out.
Her campaign unleashed a torrent of negative advertising and scare-mongering targeting Silva. And the efforts seem to be paying off as Rousseff is currently experiencing a bump in the polls just days before the vote.
In addition, large political donations continue flowing to the incumbent, a sign that Brazil's entrenched elite is comfortable with the status quo.
Construction magnates, agribusiness and oil and gas suppliers are vocally backing the president. They have no interest in relaxing their control of captive markets and state subsidized projects. They are also especially hostile to the idea of introducing new taxes on fossil fuels, as the environmentally conscious Silva is suggesting.
The latest figures on corporate donations are telling. Massive construction firms steered more than 130 million reais ($59 million) to all three candidates — though close to two thirds ended up in the president's war chest.
Restive middle class
Rousseff also has the backing of at least 35 per cent of the total electorate who benefit from cash transfer programs to the poor, according to local political scientists.
And yet, paradoxically, it may be the Workers' Party's traditional voting base — Brazil's new middle class — that could prove its undoing.
This is a group that recently climbed out of poverty and is increasingly critical of the country's poor economic performance. Many of them are also appalled by the corruption tainting the governing party.
After benefiting for a decade of easy credit and new consumer goods, their expectations are growing.
They would rather see spending directed to improving health and education systems rather than blowing billions on mega events like the World Cup or the Olympics in 2016.
This new middle class also seems less wedded to party politics than in the past, and are split on the question of Silva and Rousseff.
The higher up the income ladder, the more favorable they tend to be of Silva.
Many of them are drawn to her revolutionary promise, and were ardent protesters against Rousseff in the summer of 2013, when more than a million took to the streets to protest against the rising cost of living, the quality of social services, and a growing sense of insecurity.
Brazilian analysts distill the race down to a choice between three competing models of government: the paternalistic, statist approach advanced by Rousseff's Workers' Party; the pro-market perspective advocated by PSDB; and something of a middle way being staked out by Silva, which seems to combine elements of both.
There is no doubt that Brazilians are ready for a new kind of politics. About 70 per cent of them say they want big changes. And while the winner of the elections will almost surely be a woman, no one yet knows whose vision will prevail.