The winner of Nigeria's presidential poll, Muhammadu Buhari, has hailed his victory as a vote for change and proof the nation has embraced democracy.
Mr Buhari also praised outgoing President Goodluck Jonathan as a "worthy opponent" who peacefully relinquished power.
Gen Buhari beat Mr Jonathan by 15.4 million votes to 13.3 million.
Observers have generally praised the election, though there have been allegations of fraud.
Mr Buhari, of the All Progressives Congress (APC) party, has become the first opposition candidate to win a presidential election in Nigeria.
The former military ruler said: "President Jonathan was a worthy opponent and I extend the hand of fellowship to him.
"We have proven to the world that we are people who have embraced democracy. We have put the one-party state behind us."
This is a hugely significant moment in Nigeria's turbulent history. Never before has a sitting president been defeated in an election.
Since independence from Britain in 1960, there have been numerous coups and although the 2011 vote was an improvement, most elections have been rigged or even annulled by the military.
Of course in a relatively close election, there will be millions of people who are not pleased with the outcome. But the whole process is a sign that democracy is deepening in Nigeria and may be a tonic to other countries in Africa.
Nigerians can start to believe that it is possible to remove politicians through the ballot box.
He added: "Your vote affirms that you believe Nigeria's future can be better than what it is today. You voted for change and now change has come.
"You, Nigerians, have won. The people have shown their love for this nation and their belief in democracy."
On Tuesday, Mr Jonathan said in a statement: "I promised the country free and fair elections. I have kept my word."
He added: "Nobody's ambition is worth the blood of any Nigerian. The unity, stability and progress of our dear country is more important than anything else."
He said he had conveyed his "best wishes" to Mr Buhari, and urged "those who may feel aggrieved to follow due process... in seeking redress".
However, analysts say the margin of victory is likely to prevent any successful legal challenge.
Mr Jonathan must officially hand over power on 29 May.
This election was the fourth time that Gen Buhari, 72, had sought the presidency.
He ruled Nigeria from January 1984 until August 1985, taking charge after a military coup in December 1983.
Mr Jonathan had led Nigeria since 2010, initially as acting leader before winning elections in 2011.
Nigeria has suffered from attacks by the Islamist militant group Boko Haram, which has killed thousands of people in its drive to establish an Islamic state.
Many voters have said that they believe Gen Buhari is better positioned to defeat Boko Haram.
The former military ruler dominated the country's north-western states, winning 94% of the vote in one of the worst affected, Borno.