Thousands of opposition supporters crammed the streets of Caracas on Monday, banging pots, burning trash bags and chanting "fraud" to protest the confirmation of late leader Hugo Chavez's political heir as president-elect.
The demonstration erupted as the National Electoral Council (CNE) certified the victory of acting President Nicolas Maduro against opposition leader Henrique Capriles, who refused to concede defeat and demanded a full recount.
At one spot, police dispersed a group of protesters with tear gas.
"We are here because they stole our vote. They cheated us," said 60-year-old Selma Orjuela as she banged a pot. "We need Capriles to be president. That's why we voted, and we are sure we won."
Across town, the CNE handed the certified results to Maduro, saying he defeated Capriles 50.75 percent to 48.97 percent -- a difference of 265,000 votes.
The final score was about 30,000 votes wider than initial results, but it was still the opposition's best score against "Chavismo" in the 14 years that it has dominated the nation, which sits on the world's largest oil reserves.
"I am the son of Chavez," Maduro said. "I am the first Chavista president after Hugo Chavez Frias, and I will fulfill his legacy to protect the poor, to protect our independence."
Maduro, 50, accused the opposition of having a "coup mentality" while at the same time saying he was ready to "extend a hand" to his political rivals. He has said he is open to a vote audit.
With the United States and the Organization of American States (OAS) backing his demand for a recount, Capriles called Maduro an "illegitimate president."
Capriles, who wants the CNE to count all the backup ballots printed out by the voting machines, urged supporters to come out and protest to "let the world know our outrage, our anger."
The 40-year-old state governor also called on Venezuelans to peacefully protest in front of CNE offices on Tuesday to demand a full recount.
But CNE president Tibisay Lucena defended the electronic voting system, telling the opposition it should use "the legal path" instead of "threats" if it wants to contest the result, citing the 2000 US election that was decided by the Supreme Court.
In an business district known as a Capriles stronghold, protesters chanted "We see it, we feel it, Capriles president!" while waving Venezuela's yellow, blue and red flag.
"President Capriles won. They just didn't count the vote like they should have," said Elis Carvallo, 33, with the Venezuelan colors painted on her face.
Outside the CNE, hundreds of Chavistas dressed in red cheered and chanted "Chavez lives! The struggle goes on!" in a central Caracas square.
"We won by a hair, but we will support Maduro 100 percent," said Marta Rodriguez, 48. "Capriles asked people to trigger conflict in the country. We won't fall into provocations, but when time comes we will come out to defend Maduro."
The OAS backed calls for a recount, while the White House said a full audit would be an "important, prudent and necessary step."
"In our view, rushing to a decision in these circumstances would be inconsistent with the expectations of Venezuelans for a clear and democratic outcome," White House spokesman Jay Carney said.
Around the world, Chavez's closest allies -- from Cuba to Ecuador and Russia -- congratulated their friend's handpicked political heir, one month after the charismatic leader lost his battle to cancer aged 58. So did neighbors Brazil and Colombia.
Cuban leader Raul Castro said his ally's victory "shows the strength of the ideas and work of Comandante Hugo Chavez."
Riding a wave of grief over his mentor's death, Maduro had led opinion polls by double digits ahead of Sunday's vote, but Capriles tapped into deep discontent over rampant crime and economic weakness.
Both candidates had pledged during the campaign to recognize the result.
But Capriles -- who accepted defeat when Chavez beat him by 11 points in October polls -- said he had a list of some 3,200 "incidents" that took place during this vote.
Ignacio Avalos, a sociology professor at Central University of Venezuela, said the nation was in a "very delicate situation."
"Such a thin difference in a country that is so extremely polarized is hard to deal with politically," Avalos said. "The big challenge, however this finishes, is how to become one country again, with its conflicts and contradictions."
Maduro is due to be sworn in on Friday to complete Chavez's six-year term, which only began in January.