Joseph Kabila, the Congolese president, was just five per cent short of the 50% of votes needed to hold on to his seat, according to the Independent Electoral Commission (IEC).
Pollinaire Malu Malu, the IEC chief, announced on state television on Sunday: "Congo's President Joseph Kabila won 44.81% of votes in the country's landmark July 30 elections."
He said: "Former rebel leader Jean-Pierre Bemba came second with 20.03% of votes."
A run-off, in which Kabila and Bemba should now face each other, has already been provisionally set for October 29.
Kabila, Africa's youngest head of state, came to power in 2001, aged just 29, after the murder of his father, president Laurent Kabila.
Bemba, a wealthy businessman, is the former head of a rebel group backed by Uganda and currently holds the economy and finance portfolio in Congo. He prides himself on having brought inflation under control and restarting growth in the country's economy.
One of Bemba's guards was killed in heavy gunfire outside the electoral commission compound in Kinshasa where the results were announced.
Moise Musangana, Bemba's spokesman, said: "There were shots fired around the headquarters of the MLC [Bemba's Movement for the Liberation of Congo]. Elements of the presidential guard arrived very fast and there was a sustained exchange of gunfire.
"A soldier is dead among the ranks of Bemba's guard."
Witnesses said that the small-arms fire was the sound of the incumbent president's personal security forces battling supporters of Bemba.
Security has been increased across the capital with police patrolling the main roads and public buildings.
'Accept the verdict'
Theophile Mbemba, the interior minister, appealed to the other candidates to "accept the verdict of the ballot boxes" or use only legal methods to lodge an objection.
He said: "The Congolese people have suffered so much from the throes of war... It is time to stop the destruction of this country."
International observers have identified some irregularities in the run-up to the vote and on polling day, but most say they saw nothing to call into question the results' validity.
The parliamentary and presidential elections three weeks ago were the first free multiparty polls in former Zaire since it gained independence from Belgium 46 years ago.
It is hoped that the polls will bring peace after a brutal five-year war, which ended in 2003 after drawing in six foreign armies and leaving more than three million people dead.