The opposition All Progressives Congress (APC) declared victory for its candidate, former military ruler Muhammadu Buhari, in Nigeria's presidential election on Tuesday and said the country was "witnessing history".
"This is the first time in Nigeria that a sitting government will be voted out of power using purely democratic means," APC spokesman Lai Mohammed told Reuters at the house in the capital where Buhari was watching the results come in."The people of Nigeria have taken over."
He said the APC had no reason to doubt that President Goodluck Jonathan would concede defeat. "He said several times that he would relinquish power if he was voted out in a free and fair election," Mohammed said.
Former army general Buhari ruled between 1983 and 1985 after seizing power in a coup. Ousted himself in another military takeover led by General Ibrahim Babangida in August 1985, he declared himself a convert to democracy and has since run and lost in several previous elections.
Jonathan's five years at the helm of Africa's most populous country and biggest economy have been plagued by corruption scandals and a Boko Haram Islamist insurgency. His People's Democratic Party (PDP) has run Nigeria since the end of military rule in 1999.
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, there was restrained joy - fitting with his image as a sandal-wearing Muslim ascetic - tinged with a sense of responsibility to manage the transition in a country with a long history of political violence.
"We should all work together to redirect the country. A lot of sacrifices will have to be made," Kwara state senator and senior APC official Bukola Saraki said.
In a sign of simmering PDP passions, Buhari's march to victory was briefly interrupted when Godsday Orubebe, a former minister from the Niger Delta, grabbed a microphone and launched into a 10-minute rant against election commissioner Attahiru Jega at the body's headquarters in the capital.
"Mr. Chairman, we have lost confidence in what you are doing," he shouted. "You are being very, very selective. You are partial."
Orubebe was finally persuaded to end his sit-in and put down the microphone, allowing the results ceremony to continue.
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.
However, the level of violence and chaos was significantly lower than previous elections in the country of 170 million, which only got rid of military rule 16 years ago.
The relatively orderly conduct also eased fears of a repeat of the violence that followed a Buhari defeat to Jonathan in 2011, when 800 people were killed in three days of blood-letting in the predominantly Muslim north.
As Buhari's vote tally mounted, flashpoint northern cities such as Kaduna and Kano were quiet, helping push the stock market up almost 1 percent to a three-week high. The naira also held steady at 218 against the dollar on the black market.
"With projections that Buhari may eventually be announced president-elect, it sends a positive signal to the markets that there would be a change to the way things have been done in the past," Ayodeji Ebo, head of research at Afrinvest said.
Although Nigeria's economy has been growing at 7 percent or more, scandals over billions of dollars in missing oil receipts and the rise of the Boko Haram insurgency in which thousands have died undermined Jonathan's popularity.
The president's perceived slow reaction to the kidnapping of more than 200 schoolgirls from the village of Chibok in April last year by Boko Haram also caused widespread anger.
Buhari, a Muslim northerner, campaigned on his reputation as a military strongman who could crush Boko Haram.
The war has turned in Jonathan's favor in the past six weeks. The Islamist militants controlled an area the size of Belgium at the start of the year, but a string of military victories by troops from Nigeria, Chad, Cameroon and Niger has reclaimed much of the territory. But that progress appears to have been be too late for him.