Nigeria presidential elections
Supporters of president-elect Muhammadu Buhari and his All Progressive Congress party celebrate in KanoGoran Tomasevic/Reuters

Nigerian president-elect Muhammadu Buhari has hailed departing leader Goodluck Jonathan for peaceful transition of power after the final results showed the 72-year-old former general won clear majority in a tightly contested election.

Buhari, who was successful in his fourth attempt at the presidency, praised Jonathan saying he was a "worthy opponent".

"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 one-party state behind us," Buhari told reporters following his election win.

Buhari's party All Progessives Congress (APC ) secured 15.4 million votes while Jonathan's People's Democratic Party (PDP) won 13.3 million votes. Despite voter-rigging allegations and violence in some parts, the polling was largely peaceful.

Buhari also thanked the Nigerians who helped in the democratic process, saying: "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."

The election was billed as the tightest presidential race ever in the 54-year post-independence history of the Western African nation. Buhari and Jonathan faced each other in the 2011 election as well.

Jonathan conceded defeat in the elections and congratulated his long-time opponent. The departing leader said in a statement: "I promised the country free and fair elections. I have kept my word. I have also expanded the space for Nigerians to participate in the democratic process. That is one legacy I will like to see endure.

"As I have always affirmed, nobody's ambition is worth the blood of any Nigerian. The unity, stability and progress of our dear country are more important than anything else."

"I congratulate all Nigerians for successfully going through the process of the March 28th General Elections with the commendable enthusiasm and commitment that was demonstrated nationwide."

The voting was monitored by observers from international bodies and regional blocs.