President Hugo Chavez of Venezuela has won a third term in office, securing a clear lead over rival Manuel Rosales.
Hugo Chavez says he wants another term to complete his revolution
With most of the ballots counted, Mr Chavez had taken more than 60% of the vote, officials said.
The president, who has secured the support of the poor by using oil to fund welfare, told crowds his left-wing "Bolivarian revolution" had triumphed.
Admitting defeat, his social democrat rival said he would go on "fighting for democracy" in the streets if necessary.
"It's another defeat for the devil, who tries to dominate the world," Mr Chavez told cheering supporters, mocking US President George W Bush, and sending out a "brotherly" salute to Cuba's President Fidel Castro.
Relations between Caracas and Washington have come under increasing strain in the past few years, with the US accusing Mr Chavez of trying to destabilise Latin America.
Minutes after the preliminary results were announced, Mr Chavez appeared at the balcony of the presidential palace in Caracas.
"Today a new era has started, with the expansion of the revolution," he told tens of thousands of jubilant people.
Venezuela was firmly on the track to socialism, said the president, who has vowed to boost the social programmes that won him support among millions of impoverished Venezuelans.
He now has a clear mandate to rule for the next six years, and is likely to set about reforming the Venezuelan constitution to remove any limits on how many times he can be re-elected, the BBC's Greg Morsbach in Caracas says.
Late on Sunday Chavez supporters took to the streets to celebrate, letting off fireworks and playing pro-Chavez songs over loudspeakers.
"That should be the national anthem," one taxi driver from a shanty town told Reuters news agency as he drove around an affluent area of Caracas.
"People round here do not know what it is like in the slums. It is a bigger party than New Year's Eve."
Sunday's election saw a high turnout and the poll was monitored by hundreds of international observers.
The president, who won elections in both 1998 and 2000, is the fourth leftist to win an election in the region in recent weeks.
He won after a campaign in which he characterised his rival as a lackey of the US.
Mr Rosales, governor of the oil-rich western state of Zulia, for his part said the leftist leader was turning Venezuela into a communist state, calling him "a puppet seated on Castro's lap".
He argued that the country's long-term interests lay in free-market policies and attracting foreign investment, and accused Chavez of concentrating power in his own hands while squandering Venezuela's resources.