Gwynne Dyer, an independent journalist based in London, writes that out of Nigeria's chaos comes a democracy of sorts.
The war in Ivory Coast is over, or so we are told. Former President Laurent Gbagbo, who clung to the presidency even though he won only 46 per cent of the vote in last year's election, has been dragged from his bunker after two weeks of battle that devastated the capital, Abidjan.
President Alassane Ouattara, who got 54 per cent of the votes, is in charge, and Gbagbo is under arrest, and all's well that ends well.
Except that it didn't end very well. Indeed, it probably hasn't ended at all.
Ouattara owes a lot to the troops (the New Forces) who fought for him, and they will expect to be paid, mainly in military, police and government jobs. This will further alienate Gbagbo's supporters (mostly Christian southerners), who feel they have been occupied by a northern, Muslim army.
It's not even clear Ouattara ordered the offensive that was carried out in his name - the New Forces have about 10 semi-independent commanders.
It's even odds that the victors will simply overthrow Ouattara and take power themselves in the next year or two.
The militias that fought for Ggagbo are not finished, either. It was French firepower that finally breached Gbagbo's defences, even if New Forces soldiers made the actual arrest.
And although the French were operating under the United Nations flag, everybody in Ivory Coast knows that Ouattara has been the preferred candidate of France's President Nicolas Sarkozy for many years.
The French forces have put Ouattara in power, but now they have to withdraw rapidly. It looks bad for the former colonial power to boost an African regime into power, and the longer they stay the worse it will look.
But once they are gone, Ouattara may face resurgent southern militias that are still loyal to Gbagbo.
It is the West African Curse: rampant corruption plus chronic poverty plus ethnic rivalry produce civil wars and insurgencies that last for decades and kill hundreds of thousands of innocent civilians.
It happened in Sierra Leone, it happened in Liberia, and it started to happen in Guinea last year (although that country may have stopped on the brink).
For a long time people thought Ivory Coast was immune because of its far greater wealth. It was the world's biggest cocoa producer and the economic centre of French-speaking West Africa.
But the wealth never trickled down far, and the ethnic rivalries were the same. Indeed, they were worse, because the country is almost evenly split between Muslims in the north and Christians in the south.
East along the coast, the Curse hasn't struck yet. Ghana, on Ivory Coast's eastern border, has seen a few coups, but no massacres and it is now a flourishing democracy with a respectable growth rate.
Togo and Dahomey are not so lucky, but they have had no huge massacres, either.
And giant Nigeria has done surprisingly well, given that it has all the ingredients of a classic West African-style disaster.
Nigeria has oil, but most of the money has been stolen by a small elite class, while the majority of Nigerians remain poor. It is even more deeply divided than Ivory Coast in ethnic and religious terms. Yet Nigeria never slid over the edge.
It has had many coups, and even when "democracy" was restored the elections were shamelessly rigged. The Muslim-Christian split dominates national politics, and sometimes leads to local massacres.
It is a chaotic, abrasive, almost lawless society - but also a highly successful one, with 7 per cent growth and a functioning, if deeply corrupt, democracy. It is, in a weird way, a very stable country.
The one major threat to its stability is the fact that its elections are getting more honest. When the outcome was decided in advance, the basic north-south deal was safe: a two-term Muslim president from the north would be followed by a two-term Christian president from the south, and then back again.
That way, everybody who mattered in Nigeria could count on getting their turn at the trough. This time, however, the Muslim president died halfway through his first term, and his Christian vice-president, Goodluck Jonathan, took his place.
Jonathan likes the job so much he is running for re-election as President, which enrages the northern, Muslim elite who think it should be their turn. To make matters more dangerous, this time new election rules and an official who can't be bought mean that the votes will actually be counted.
Last weekend's parliamentary elections saw the ruling People's Democratic Party (PDP), the vehicle of both the northern and southern elites, lose ground dramatically to new opposition parties.
If Jonathan wins the presidential election (results are expected by today or tomorrow) he will face a Parliament where the PDP majority is both narrow and fragile. If his leading rival Muhammadu Buhari, a former military ruler whose support is solely in the north, should win, Buhari would be in an even more vulnerable and isolated position. The potential for an ugly north-south, Muslim-Christian confrontation is very high.
Ivory Coast has been going down for some time, and it may not have touched bottom yet. Nigeria's 140 million people are on the way up, but they must still go through a tricky transition, and nobody knows if they are exempt from the Curse.