Venezuela's socialist President Hugo Chavez has comfortably won re-election, quashing the opposition's best chance at unseating him in 14 years and cementing himself as a dominant figure in modern Latin American history.
Chavez's victory will extend his rule of the OPEC member state to two decades, although he is recovering from cancer and the possibility of a recurrence hangs over him.
Jubilant supporters poured onto the streets of Caracas to celebrate the victory of a man who has near-Messianic status among Venezuela's poor. And there was relief too among leftist allies around the region - from Cuba to Bolivia - who rely on his oil-financed generosity.
"I'm celebrating with a big heart," said Mary Reina, a 62-year-old Chavez supporter who lives in the hillside slum where the president cast his vote.
"Chavez is the hope of the people and of Latin America."
The 58-year-old Chavez took 54.42 percent of the vote, with 90 percent of the ballots counted, compared with 44.97 percent for young opposition candidate Henrique Capriles, the electoral authority said.
Chavez's fans partied and set off fireworks in the streets. A subdued and tired-looking Capriles accepted defeat in a speech at his campaign headquarters.
"I hope a political movement that has been in power for 14 years understands that almost half the country does not agree with it," Capriles told crestfallen supporters.
Since taking power in 1999, the flamboyant former soldier has become a global flag bearer of "anti-imperialism," gleefully baiting the U.S. government while befriending leaders from Iran to Belarus whom the West views with suspicion.
Highlighting the relief among leftist allies in Latin America, Argentine President Cristina Fernandez wrote via Twitter: "Your victory is our victory! And the victory of South America and the Caribbean!"
At home, casting himself as an heir to independence hero Simon Bolivar, Chavez has poured billions of dollars in oil revenues into anti-poverty programs, and skillfully used his humble roots and folksy oratory to build a close connection with the masses.
But his 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 percent will boost Chavez's democratic credentials, though critics said his use of state resources made a mockery of fairness during the campaign.
WHAT NEXT?
Attention will now shift to Chavez's plans for a new six-year term at the helm of South America's biggest oil exporter.
The government spent lavishly during the campaign to boost Chavez's chances, likely ensuring healthy economic growth of 4 to 5 percent this year but potentially paving the way for an inflation-fueled hangover in 2013.
In the past, Chavez has taken advantage of election wins to press forward with radical reforms, and there is speculation that his taste for nationalizations may turn to some untouched corners of Venezuela's banking, food and health industries.
Having already controversially amended the constitution to scrap presidential term limits, Chavez might also be tempted to tinker with it further to ensure continuity for his ruling Socialist Party should his cancer return.
The constitution states that 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.
Either way, all eyes will be on Chavez's health again.
During a year's treatment from mid-2011, Chavez 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 skepticism from doctors who say that at least two years must pass before a cancer patient can be given a clean bill of health.
Chavez 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 now would stoke a succession debate in the Socialist Party. Congress head Diosdado Cabello, Foreign Minister Nicolas Maduro and Vice President Elias Jaua all look well-placed for a potential push for leadership.
But none of Chavez's allies come anywhere near his popularity, so if there were to be another election, Capriles could be a favorite 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 Chavez 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.
Chavez'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 Andres Perez.
On his way into jail, wearing a red military beret that was to become his trademark, Chavez 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, Chavez 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, Chavez 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.
Chavez'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 Chavez's triumph.