Nicolas Maduro won 50.7% of the vote against 49.1% for opposition candidate Henrique Capriles Radonski.
Henrique Capriles has demanded a recount, saying Nicolas Maduro was now “even more loaded with illegitimacy”.
The opposition candidate said there were more than 300,000 incidents from Sunday’s poll that would need to be examined.
The electoral commission said the results were “irreversible”.
When the results were announced at 23:15 local time, celebrations erupted in the capital, Caracas, where Nicolas Maduro’s jubilant supporters set off fireworks and blasted car horns. Opposition voters banged pots and pans in protest.
In a victory speech outside the presidential palace, Nicolas Maduro, wearing the colors of the Venezuelan flag, 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”.
Nicolas Maduro said he had spoken to Henrique Capriles on the phone, and that he would allow an audit of the election result.
The former Venezuela’s vice president, who was hand-picked by Hugo Chavez as his successor, called for those who had not voted for him to “work together” for the country.
However, Nicolas Maduro’s margin of victory was far narrower than that achieved by Hugo Chavez at elections last October, when he beat Henrique Capriles by more than 10%.
At Henrique 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, Henrique Capriles emerged, angry and defiant.
“It is the government that has been defeated,” he said.
Then, addressing Nicolas Maduro directly, Henrique Capriles said: “The biggest loser today is you. The people don’t love you.”
Nicolas Maduro had been serving as acting president since Hugo Chavez died of an unknown type of cancer on March 5.
He is due to be sworn in on April 19 and serve until January 2019 to complete the six-year term that Hugo Chavez would have begun in January.
Hugo 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, Hugo Chavez’s political opponents accused him of being an autocrat, intent on building a one-party state.
Hugo Chavez bequeaths a nation beset by crumbling infrastructure, unsustainable public spending and under-performing industry.
8OegEI2JnGYImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…