Nigeria deserves our congratulations. Not because Muhammadu Buhari is a particularly fortuitous choice, but because the country has succeeded in bringing about a change of government for the first time since its return to democracy. Until very recently most Nigerians - and many others besides - believed that the powerful ruling PDP would be able to win every election either by genuinely attracting support at the ballot box or by intimidation or manipulation. So if the transfer of power proceeds even relatively peacefully, Nigeria's democracy will have taken a big leap forward.
Why were things so different this time round? Firstly, because the major opposition parties joined forces to form an alliance. This alliance was able to agree on a joint presidential candidate in an unusually transparent and democratic selection process. This enabled Buhari to broaden his electoral appeal beyond his core Muslim supporters in Nigeria's north. This was true in particular of the densely populated southwest of the country, which includes the commercial capital Lagos.
Goodluck Jonathan has earned great respect by conceding defeat quickly and unambiguously. This is not something that one can take for granted either in Nigeria or elsewhere in Africa. Jonathan actually facilitated Buhari's victory. The outgoing president was never attuned to the needs of the people of northern Nigeria, as was shown by his lack of interest in tackling the Boko Haram insurgency. His resolve to defeat the terrorists only hardened when he saw an election victory slipping away. By neglecting to address insecurity year after year, he drove many Christians to vote for Buhari, a Muslim. Many of the villages which were invaded by Boko Haram were Christian. Most of the Chibok schoolgirls, kidnapped by the Islamist militants a year ago, were also Christian.
Many of the Christians in the northeast and in the central regions - where Muslim and Christian settlements border on one another - came to the conclusion that Jonathan, a Christian president, was unwilling or unable to offer them any protection.
Of all the protagonists in this election, the chairman of the Independent Electoral Commission (INEC), Attahiru Jega, deserves the most praise. The professor of politics has had to withstand enormous pressure over the last few weeks. The government, with the help of the military, forced him to postpone the election by six weeks. Politicians from Jonathan's camp called almost daily for his removal. Jega was alternately accused of being in cahoots with the opposition or of wanting to use unreliable new voting technology. Yet in spite of the chorus of protest in some quarters ahead of the poll, the election itself proved to be an orderly affair almost everywhere. Credible observers did not voice any fundamental criticisms of the vote.
INEC had a difficult job. This was shown by events in Rivers State in the Niger Delta. Jonathan's PDP had reportedly garnered 1.5 million votes whereas Buhari's APC had secured only 70,000. Yet the governor of the state defected to the APC months ago and became Buhari's campaign manager. Buhari himself was able to successfully launch his campaign in Port Harcourt, capital of Rivers State.
It is therefore hardly surprising the regional head of the electoral commission found himself fluffing his lines when reading the dubious results out loud. The courts may well find it necessary to scrutinize the outcome of the Rivers State poll.
Buhari will face tough challenges on taking over the reins from Jonathan. The Nigerian economy is largely dependent on the country's oil reserves. Public spending is financed almost entirely by oil revenue. As oil prices are low, these are difficult times for Nigeria. Boko Haram has not yet been defeated. Buhari, a northerner himself, may, however, find it easier to accommodate the aspirations of the north more easily than Jonathan. Hopefully, the ex-general will realize that a military victory over the militant Islamists is only part of the answer and that the northeast needs opportunities for development as well. The Niger Delta region - following Jonathan's defeat - is likely to present him with greater problems. The militants there had been pacified but not vanquished and were allowed to enrich themselves under Jonathan's rule. They will try to defend that which they claim belongs to them. Weeding out the corruption which flourished under Jonathan may well be one of Buhari's easier tasks. Things can really only get better.
From a broader perspective, Buhari will have to demonstrate that he really has become a true democrat. Even his respected predecessor Olusegun Obasanjo tended to adopt a military, authoritarian tone every now and again after he was elected in 1999. Human rights in Nigeria suffered as a consequence.