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.
8OegEI2JnGYThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…