According to a Reuters tally from 34 of Nigeria's 36 states, the 72-year-old Buhari had 14.6 million votes, testament to the faith Nigerians have put in him as a born-again democrat intent on cleaning up the country's notoriously corrupt politics.
That support compared to 11.3 million for President Goodluck Jonathan, whose five years at the helm in Africa's biggest economy and top oil producer have been plagued by corruption scandals and a Boko Haram Islamist insurgency.
One of Jonathan's redoubts in the oil-producing Niger Delta is yet to report but the gap is so large it is hard to see the leader of the People's Democratic Party (PDP), which has run Nigeria since the end of military rule in 1999, closing it.
Buhari took power in a coup in December 1983 but was ousted in another military takeover led by General Ibrahim Babangida in August 1985. He has since run in several elections and declared himself a convert to democracy.
Bar some technical glitches and the killing of more than a dozen voters by Boko Haram militants in the northeast, the election has been the smoothest and most orderly in recent history - a factor that appears to have played in the outcome.
"There are probably lots of reasons why the PDP might have lost, but I think the key one is that the elections just haven't been rigged," said Antony Goldman, a business consultant with high-level contacts in Nigeria.
"If you leave it to the Nigerian people they will be ready to make big decisions and to make Nigeria look something more like a conventional democracy."
In the Abuja house where Buhari was staying during the delivery of the final results, there was joy tinged with a sense of responsibility to manage the transition smoothly in a turbulent country with a long history of political violence.
"We are on course to win. We need to first manage this period where - for the first time in Nigeria - we are going to see an incumbent government unseated in the polls," Kwara state senator and senior APC official Bukola Sarki said.
"We should all work together to redirect the country in the right direction," he added. "A lot of sacrifices will have to be made in the next few years with the economic and security situation in our country."
Buhari's march towards victory was briefly interrupted when former PDP minister Godsday Orubebe, a Niger Delta community leader, grabbed a microphone and launched into a 10-minute rant against election commissioner Attahiru Jega at the election commission headquarters in Abuja.
"Mr. Chairman, we have lost confidence in what you are doing. You are being very, very selective. You are partial," he shouted as nervous security guards stood by, wondering what to do.
Orubebe was persuaded to end his sit-in and put down the microphone, allowing the results ceremony to continue.
"Disturbing"
The weekend vote was marred by technical glitches, arguments and occasional violence but overall proved to be less chaotic than previous elections in the country of 170 million, which only got rid of military rule in 1999.
At least 15 people were shot dead on polling day, most of them in the northeast where Boko Haram has declared war on democracy in its fight to revive a mediaeval caliphate in the sands of the southern Sahara.
More than 800 people were killed in post-election violence in 2011, most of them in the predominantly Muslim north.
http://timesofindia.indiatimes.com/followceleb.cms?alias=Nigeria election,Muhammadu Buhari,General Ibrahim Babangida
Stay updated on the go with Times of India News App. Click here to download it for your device.