Venezuela's socialist leader Hugo Chavez has comfortably won re-election, quashing the opposition's best chance at unseating him in 14 years.
A fist-pumping Chávez led throngs of supporters in celebration from the balcony of the presidential palace – just months after cancer treatment had taken him out of the public eye and left him fending off rumours he was dying.
A new six-year term will extend his rule of the OPEC member state to two decades, giving him a chance to deepen his oil-revenue-fuelled socialism while continuing to support left-wing allies in Latin America, though a possible recurrence of cancer still hangs over him.
"Today we've shown that Venezuela's democracy is one of the best democracies in the world, and we will continue to show it," the 58-year-old Chávez shouted, dressed in a signature red shirt and waving a replica sword of independence hero Simon Bolivar.
Crowds roared, and the smoke of fireworks clouded the air.
Chávez took 54.42% of the vote, with 90% of the ballots counted, compared to 44.97% for young opposition candidate Henrique Capriles.
Since taking power in 1999, the flamboyant former soldier has become a global flag bearer of "anti-imperialism", gleefully baiting the US government while befriending leaders from Iran to Belarus whom the West views with suspicion.
At home, casting himself as an heir to independence hero Simon Bolivar, Chávez has poured billions of dollars in oil revenues into anti-poverty programs, and skilfully used his humble roots and folksy oratory to build a close connection with the masses.
"Chávez is my joy. He will continue protecting the poor and defenceless," said Gladys Montijo (54), a teacher.
Highlighting relief among Latin American allies, Argentina's President Cristina Fernández wrote via Twitter: "Your victory is our victory! And the victory of South America and the Caribbean!"
Opposition leaders appeared crushed by the loss, with some Capriles supporters bursting into tears at his campaign headquarters as the news sank in.
The youthful state governor put on a brave face, celebrating his "house-by-house" campaign as the start of a long road to changing the direction of the country.
"I hope a political movement that has been in power for 14 years understands that almost half the country does not agree with it," a subdued and tired-looking Capriles told crestfallen supporters.
Chávez's victory was considerably slimmer than his win of 25 percentage points in 2006, reflecting anger at his failure to fix basic problems such as crime, blackouts and corruption.
Record turnout of 80% on Sunday will boost Chávez's democratic credentials, though critics said his use of state resources made a mockery of fairness during the campaign.
After heavy campaign spending, South America's biggest oil exporter faces growing pressure to devalue its currency in 2013, likely spurring inflation that has been a top complaint of Chávez sympathisers.
In the past, Chávez has taken advantage of election wins to press forward with radical reforms. His often-capricious nationalisations may now turn to some untouched corners of Venezuela's banking, food and health industries.
Cancer, though, could change that.
The Constitution says if an incumbent steps down in the first four years of a six-year term, a new vote would be called. Under such a scenario, Capriles or another opposition candidate would have another crack at power.
During a year's treatment starting in mid-2011, Chávez endured three operations for two cancerous tumors, and chemotherapy that left him bald, exhausted and fearing death at his lowest point.
He wrongly declared himself cured once, and repeated that in July after a recurrence, prompting scepticism from doctors who say that at least two years must pass before a cancer patient can be given a clean bill of health.
Chávez has looked bloated and at times exhausted in recent months, but he ran a surprisingly energetic end to his campaign, even managing to dance, sing and strum a guitar at rallies.
Any sign of a downturn in his health in the future would stoke a succession debate in the ruling Socialist Party.
Congress head Diosdado Cabello, Foreign Minister Nicolás Maduro and Vice-President Elías Jaua all look well-placed for a potential push for leadership.
But none of Chávez's allies come anywhere near his popularity, so if there were to be another election, Capriles could be a favourite after a widely praised campaign that has made him well-known across the nation of 29-million people.
Though the 40-year-old Capriles is the once-rudderless opposition's best leader of the Chávez era, his position is not guaranteed. There are other young political figures – including Zulia state governor Pablo Perez and telegenic former Caracas district mayor Leopoldo Lopez – waiting in the wings.
State elections ahead
Now, Capriles and other leaders of the Democratic Unity coalition must dust themselves off and prepare for state governorship elections in December, when they will hope at least to increase the opposition's influence at the local level.
Chávez's new six-year term begins on January 10.
His latest election win continues a remarkable story that began with his birth on July 28 1954 in a mud hut belonging to his grandmother in the rural village of Sabaneta.
He joined the army and spent years plotting before a failed coup in 1992 against president Carlos Andrés Pérez.
On his way into jail, wearing a red military beret that was to become his trademark, Chávez gave a two-minute televised speech admitting that his revolution had failed "for now". The speech electrified the nation and launched his political career.
Pardoned in 1994, Chávez began crisscrossing the country sharing his vision and eventually shocking the political elite by sweeping to victory at the ballot box in 1998.
With private media and business leaders opposed to his rule, Chávez was briefly toppled by army dissidents and street protests in 2002 – but returned two days later thanks to military loyalists and popular counter-demonstrations.
He also survived an economically crippling oil strike.
Chávez's win will probably mean more foreign investment from politically allied countries such as China, Russia, Iran and Belarus, while Western investors are more cautious. Relations with Washington are also likely to remain on edge, though Venezuelan oil has continued to flow to the United States over the years despite the diplomatic tension.
Wall Street had been hoping for a Capriles win, so prices of Venezuelan bonds – among the most actively-traded emerging market debt – are likely to dip on Chávez's triumph. Reuters