I'm back in Kenya, putting in a stint on a local newspaper. After six years away, it feels good to be working here again. Good to hear Swahili - that language I always feel I am on the verge of understanding but never quite do - good to see the jacarandas in bloom, good to watch the jumble of faces on the streets of this most cosmopolitan city: blue-black Sudanese, Somalis with henna-tinted beards, Masai with stretched ear lobes walking past yuppies with briefcases and mobile phones.

But as I soak in Nairobi's sights and sounds, my mind keeps turning to events on the other side of Africa, to Ivory Coast. The radio bulletins log the latest twists in an unbelievable saga. Collapse of the ceasefire between the rebel-held north and government-controlled south. Death squads hunting for whites to lynch in revenge for France's destruction of the Ivorian air force. Refugees seeking safety in war-torn Liberia. "Could it happen here?" I keep wondering. "Has Kenya, which seems so stable on the surface, got the seeds of an Ivory Coast within it?"

The question poses itself because Kenya and Ivory Coast were once African twins, mirror images of one another. Both were regarded as rare success stories, stable linchpins in turbulent regions. If Kenya, led by Daniel arap Moi, held a special place in Britain's affections, Ivory Coast, led by Felix Houphouet-Boigny, was France's baby. True, both countries had their ethnic tensions and faltering economies. But they also boasted prosperous middle classes with every interest in maintaining the status quo. They were deemed so precious that both former colonial masters were ready to spring to the rescue if chaos threatened. The British army used northern Kenya for training

exercises, France kept troops permanently

camped near Abidjan airport.

I lived in Abidjan in 1992 and spent a holiday exploring Ivory Coast by car. I remember giving a lift to two hitch-hiking Ivorian soldiers without a second's hesitation. Back in Abidjan, I used to meet friends in the "popular quarters" at night to eat roasted fish alongside Ivorian families. True, there was a climate of genteel decline about the place. But if someone had asked me which nation felt more secure, Ivory Coast or Kenya, I would have picked the former without hesitation. The food was a lot better, too.

It took less than a decade to destroy all that. Jostling for position in the wake of Houphouet-Boigny's death in 1993, a succession of insecure leaders cynically played the ethnic card. First Henri Konan Bedie, then General Robert Guei and now Laurent Gbagbo used the notion of "real" Ivorian identity to sideline and disenfranchise the Muslim northerners whose candidate for the presidency, Alassane Ouattara, was possibly the best man for the job. In the process, they gave the jobless youths in the south's teeming slums a convenient hate target. The speed with which Ivory Coast has gone from regional haven to a divided nation in which genocidal squads hunt for victims - with the tacit approval of the president - has been staggering to behold.

Could it happen here? Of course it could. If, in Ivory Coast, there was always a latent hostility between southern Christians and Muslim "outsiders", it was probably no more pronounced than the suspicion Kenya's Kalenjin feel towards the Kikuyu or the Kikuyu feel towards the Luo. If Ivory Coast's steady economic slide combined with a booming population always made for a volatile cocktail, the same ingredients are at work in Kenya. The only difference is that none of the politicians in Kenya today has chosen to play the ethnic card with the ruthlessness of their Ivorian colleagues.

But it's not hard to imagine that changing. Kenya, in the wake of Moi's retirement, is living through a strange hiatus. Its tribally based parties pulled together long enough to ensure Moi's chosen successor lost the elections. But they have failed to unite and the ruling Narc coalition is falling apart as they position themselves in the run-up to 2007 elections. Every substantive political discussion in Kenya is premised on ethnicity. In every constituency a frenzied scramble is taking place for scarce land, forestry and water. And millions of prospectless young Kenyans are just as angry as their Ivorian equivalents and vulnerable to the rabble-rouser's call. Material enough for any politician who decides ethnic hatred is his strongest manifesto weapon.

I'm not predicting catastrophe in Kenya. But Ivory Coast has demonstrated, in a way few thought possible, that in Africa the line separating stability from anarchy is no more than wafer-thin. In a few years, a few wicked men can destroy what seemed solid. As Kenya emerges from the Moi era and enters uncharted waters, the message for its politicians is clear. Gaze across the continent to West Africa and remember that the peace you now enjoy should not be taken for granted. Look and learn, my friends, look and learn.