A second round of voting will be needed in the Democratic Republic of Congo's landmark presidential poll after none of the candidates won 50% of the vote.
Joseph Kabila will face a run-off with Jean-Pierre Bemba (right)
Incumbent President Joseph Kabila took a 45% share, while his nearest rival Jean-Pierre Bemba won 20%.
The pair are now set to face each other in a run-off on 29 October.
Prior to the announcement, at least five people were killed in Kinshasa, when security forces loyal to Mr Kabila and Mr Bemba exchanged gunfire.
The 30 July election was the first democratic poll to be held in the country since it gained independence in 1960.
After the results were declared, Mr Kabila appeared on state TV, saying he had won a "great victory".
"To all of you who have chosen me, I say thank you. Thanks for having placed me in first position for these elections," he said.
Turn-out was about 70% of the 25m registered voters.
The chairman of the Independent Electoral Commission (CEI), Rev Appolinaire Malu-Malu, announced the results on state TV hours later than expected.
According to BBC Africa correspondent Peter Greste, the delay was the result of the gun battle that broke out between the security forces and bodyguards protecting the vice-president and former rebel commander Mr Bemba.
One Japanese citizen was among those killed, while at least five more people died in an accident caused by people trying to flee the scene, reports the BBC's Said Penda in Kinshasa.
The security forces and the 17,000 UN peacekeepers in DR Congo are on alert in case of further unrest.
However, some observers believe the second round could help stave off violence that may have greeted an outright win by Mr Kabila, particularly in the capital, Kinshasa, where Mr Bemba is hugely popular.
"Tension would have been very high without a second round," a Western diplomat told AFP.
The clashes serve as a reminder of the potential for violence
Correspondents say the clashes in Kinshasa serve as a reminder of the fragile nature of DR Congo's peace following five years of conflict.
Mr Bemba and other former rebel leaders retain their own personal security forces.
Some of the 30 candidates eliminated in the first round had alleged widespread fraud even before the results were announced.
On Sunday, UN Secretary General Kofi Annan urged all "candidates to abide by the electoral law in the resolution of any disputes related to the electoral process," and urged them to "accept and respect the final results of the elections, in a spirit of peace and reconciliation."
The results show a regional division in DR Congo, a country two-thirds the size of western Europe.
Mr Bemba won most votes in the west of the country, while Mr Kabila gained most support in the Swahili-speaking east.
The first round of voting, involving 25 million voters, was the most expensive poll the UN had ever run, and a second round is also expected to be a costly and difficult exercise.
Three TV stations have been suspended for 24 hours after broadcasting images that could incite violence.
One is a state channel and another is owned by Mr Bemba.
The polls are meant to put an end to a transition process established after five years of war that ended in 2003.