Venezuela's election authority has formally proclaimed Nicolas Maduro as the winner of Sunday's closely-fought presidential election.
The National Electoral Council backed the slender victory of Mr Maduro, the acting president, despite protests from opposition candidate Henrique Capriles.
The official count indicates he won 50.7% of votes to Mr Capriles' 49.1%.
Following the announcement, clashes broke out between protesters and police in the capital Caracas.
Police fired tear gas at hundreds of students demonstrating in one part of the city, while elsewhere opposition supporters took to their balconies and the streets to bang pots and pans in protest.
Mr Capriles had earlier urged national protests and a march on the electoral offices in the capital in the event that Mr Maduro was declared victor.
He called on the National Electoral Council not to confirm the election result, citing voting irregularities, and demanded a recount.
He said he regarded the election of Mr Maduro as "illegitimate".
The poll was called after President Hugo Chavez died of cancer on 5 March.
Mr Maduro is a former bus driver who rose to become Mr Chavez's vice-president and heir apparent.
Mr Capriles said there were more than 3,200 "incidents" from Sunday's poll that needed to be examined.
"All we're asking is that our rights be respected, that the will of the people be respected, and that every single vote be counted, every little piece of paper," he told a news conference broadcast on national television.
But while it has agreed to an audit of the electronic counting system, the government is rejecting calls that the ballot boxes be opened for a manual recount.
Monday saw opposition students briefly invade a hotel where international election observers are staying, demanding to know why the vote had been declared free and fair.
Russian President Vladimir Putin and Cuban leader Raul Castro were among the first heads of state to congratulate Mr Maduro on his win.
But the US has called for an audit of the results.
"This appears an important, prudent and necessary step to ensure that all Venezuelans have confidence in these results," said a White House spokesman.
As the news of Mr Maduro's victory emerged on Sunday night, celebrations erupted in Caracas.
Thousands of jubilant supporters took to the streets, dancing, singing and blasting car horns, while fireworks lit up the night sky. Opposition voters banged pots and pans in protest.
Speaking outside the presidential palace, Mr Maduro told crowds that the result was "just, legal and constitutional".
He said his election showed Hugo Chavez "continues to be invincible, that he continues to win battles''. He called for those who had not voted for him to "work together" for the country.
He is now set to be inaugurated for a six-year term on Friday.
But Mr Maduro's margin of victory was far narrower than that achieved by Chavez at elections last October, when he beat Mr Capriles by more than 10 percentage points.
At Mr Capriles' campaign headquarters the mood was sombre, as his supporters watched the results on television. Some cried, while others hung their heads in dismay,
Shortly afterwards, Mr Capriles emerged, angry and defiant.
"It is the government that has been defeated," he said. Then, addressing Mr Maduro directly, he said: "The biggest loser today is you. The people don't love you.
"Mr Maduro, if you were illegitimate before, now you are more so."
The new president faces an extremely complex task in office, says the BBC's Central America correspondent, Will Grant.
Venezuela has one of the highest rates of inflation in the region and crime rates have soared in recent years, particularly in Caracas. Food shortages and electricity blackouts are also common.
But perhaps Mr Maduro's biggest challenge will be trying to govern a country which is so deeply divided and polarised, and where the opposition say they have an increasingly legitimate stake in the decision-making process, our correspondent says.
Mr Maduro had been serving as acting president since Mr Chavez died.
He is due to be sworn in on 19 April and serve until January 2019 to complete the six-year term that Mr Chavez would have begun in January.
Mr Chavez was a divisive leader. To his supporters he was the reforming president whose idiosyncratic brand of socialism defeated the political elite and gave hope to the poorest Venezuelans.
He effectively used his country's vast oil reserves to boost Venezuela's international clout, and his strident criticism of the US won him many political allies in Latin America.
However, his political opponents accused him of being an autocrat, intent on building a one-party state.