Venezuela's acting President Nicolas Maduro was declared the winner of the election to succeed his late mentor Hugo Chavez by a razor-thin margin late Sunday, but his rival refused to concede defeat.
The contested result plunged the deeply divided oil-rich South American country into uncertainty, with the heir of Chavez's socialist revolution declaring victory and opposition leader Henrique Capriles demanding a recount.
Fireworks erupted after the National Electoral Council announced that near complete results showed Maduro had won with just 50.66 percent of the vote compared to 49.1 percent for Capriles -- a difference of less than 300,000 votes.
"This victory is another tribute to our comandante Hugo Chavez," the 50-year-old Maduro said in front of cheering supporters at the Miraflores presidential palace.
"Today we can say that we had a fair electoral triumph," he added, saying he was open to an audit of the close vote tally.
Maduro said he spoke with Capriles by telephone and that he told his rival he must recognize the outcome of the election. Both candidates had pledged during the campaign to accept the results.
But Capriles -- who had accepted defeat when Chavez beat him by 11 points in October polls -- held up a list of some 3,200 "incidents" that took place during the vote.
"Today's loser is you," he told a news conference, referring to Maduro, adding: "We won't recognize a result until every vote has been counted."
Hours earlier, the 40-year-old opposition leader charged that there were attempts to let people vote after polling stations closed. He had also accused the government of pressuring civil servants to vote for Maduro.
But National Electoral Council president Tibisay Lucena said the results were "irreversible" after 99 percent of electronic votes were counted, with 78 percent turnout.
Named by Chavez as his political heir, Maduro rode a wave of grief for the late leader, who ruled Venezuela for 14 years with a socialist revolution that made him popular among the poor while disenchanting others fed up with the weak economy.
Opinion polls had given Maduro leads of 10 to 20 points during the campaign, but Capriles energized the opposition in his second shot at the presidency.
Maduro has vowed to continue the oil-funded policies that cut poverty by almost half to 29 percent through popular health, education and food programs.
But Chavez left behind a litany of problems: South America's highest murder rate, with 16,000 people killed last year, chronic food shortages, high inflation and recurring power outages.
Hundreds of Chavistas began to celebrate in front of the presidential palace well before the results were announced, launching fireworks, dancing and holding pictures of Maduro and Chavez.
"This is a very important victory for the future of the country. This is the legacy of our comandante, who is no longer here. But he left us Maduro and he will defend his project," said Rafael Perez Camarero, 29.
Capriles had graciously accepted his defeat when Chavez beat him in October polls that marked the opposition's best showing against the late leader. Sunday's result against Chavez's handpicked heir was far closer.
Maduro inherited Chavez's formidable electoral machinery, which helped the late leader win successive elections in 14 years, with government employees often seen handing campaign pamphlets and attending rallies in groups.
In the capital's Plaza Bolivar, a historic square known as a gathering point for Chavistas, Maduro supporters chanted "Chavez, we obeyed, we won and we continue!" and "Chavez lives, the struggle goes on!"
After voting in Caracas earlier in the day, Maduro warned there would be no dialogue with the "bourgeoisie" -- his term for the opposition -- and took a shot at the United States, saying he would present evidence of US interventionism on Monday.
His candidacy was backed by Chavez's leftist allies in the region, especially communist Cuba, whose anemic economy has been kept afloat by generous oil shipments from a nation sitting on the world's biggest crude reserves.