"Mr. Maduro, you were the loser ... This system is collapsing, it's like a castle of sand—touch it and it falls."
A protracted election dispute could cause instability in a deeply polarized nation with the world's largest oil reserves.
Though some opposition supporters chanted "fraud," banged pots and pans and burned tires in protest, Capriles did not call them onto the streets en masse.
Maduro said he would accept a full recount, even as he insisted his victory was clean and dedicated it to Chavez.
"We've had a fair, legal, and constitutional triumph," Maduro told his victory rally. "To those who didn't vote for us, I call for unity. We are going to work together for the security and economy of this country."
The election board said Maduro's win was "irreversible" and gave no indication of when it might carry out an audit.
(Read More: Can Maduro Turn Round the Economy?)
Maduro's slim victory provides an inauspicious start for the "Chavismo" movement's transition to a post-Chavez era, and raises the possibility that he could face challenges from rivals within the disparate leftist coalition.
His supporters set off fireworks, and some sang and danced in the streets, but celebrations were far more muted than after Chavez's comfortable re-election last October.
"On one hand, we're happy, but the result is not exactly what we had expected," said Gregory Belfort, 32, a computer technician looking slightly dazed with other government supporters in front of the presidential palace.
"It means there are a lot of people out there who support Chavez but didn't vote for Maduro, which is valid."
Russian President Vladimir Putin congratulated Maduro and said he expected good relations to continue with a country where Moscow has significant oil investments.
Maduro's narrow win came as a shock to many ardent Chavez loyalists, who had become accustomed to his double-digit election victories during his 14 years in power, including an 11 percentage point win over Capriles last October.
Maduro's campaign was built almost entirely on his close ties to the late leader and emotional anecdotes about Chavez's final days before succumbing to cancer.
The narrow win leaves him with less authority to lead the broad ruling alliance that includes military officers, oil executives and armed slum leaders. It had been held together mainly by Chavez's iron grip and mesmerizing personality.
"This is the most delicate moment in the history of 'Chavismo' since 2002," said Javier Corrales, a U.S. political scientist and Venezuela expert at Amherst College, referring to a brief coup against Chavez 11 years ago. "With these results, the opposition might not concede easily, and Maduro will have a hard time demonstrating to the top leadership of Chavismo that he is a formidable leader."
It will also add to the difficulty Maduro faces in moving from campaign mode to actually governing a nation with high inflation, a slowing economy, Byzantine currency controls and one of the world's worst violent crime rates.
Last year's blow-out state spending ahead of Chavez's re-election helped spur economic growth of 5.6 percent in 2012. This year, many private economists expect growth of 2 percent or less.
"These results require deep self-criticism," said Diosdado Cabello, the powerful head of the National Assembly whom many Venezuelans see as a potential rival to Maduro.
"It's contradictory that some among the poor vote for those who always exploit them," Cabello added on Twitter. "Let's turn over every stone to find our faults, but we cannot put the fatherland or the legacy of our commander (Chavez) in danger."