When he became president of Somalia in 2004 there were hopes that Abdullahi Yusuf Ahmed, who had experience both as military strongman and politician, might help heal a country shattered by years of anarchy and chaos. But in his four years in office he failed, as the rest of the world failed before and since, to restore order to the stricken African country which has been called the world's worst failed state.
One graphic insight into the plight of the Somali people was given in a report which classed it as the world's worst place to go to school. Its authors wrote: "Only 10 per cent of children are enrolled in primary school. Ongoing conflict, civil unrest and fragility have had a catastrophic effect." Some of those children are not at school, according to aid agencies, because warlords have conscripted them into militias. Factor in the deaths of up to a million people, chronic instability, drought, the presence of Al-Qa'ida and Islamist fundamentalist fighters, as well as piracy, and it is hardly surprising that Yusuf failed.
His career is to be seen against the backdrop described by the Africa expert Richard Dowden, who wrote: "Like a fire that incessantly re-lights itself, Somalia has erupted again and again since 1991 in battles for territory, power or honour. The reasons: outside interference and the fractious rivalry between the clans and sub-clans. The individualistic and recriminatory Somalis find it hard to make the compromises necessary for national coherence."
Yusuf, born in 1934 in the Puntland region on Somalia's north-eastern tip, studied law before joining the Somali army and training in Italy and the Soviet Union. He saw combat in one conflict with neighbouring Ethiopia. He rose to the rank of colonel but was jailed for refusing to take part in a military coup staged by another officer. The coup's leader, Siad Barre, established himself as dictator and punished Yusuf by keeping him in jail from 1969 to 1975.
Three years after his release Yusuf tried to overthrow the Barre dictatorship but failed and fled to Kenya, where he put together a guerrilla movement. He formed a relationship with Ethiopia but when this soured, as it did in 1985, he was imprisoned there for six years.
He was released in 1991, in the same year as the Barre regime was ousted and civil war erupted. Yusuf became the dominant force in Puntland, which remained relatively peaceful while conflict and power struggles raged in other regions. Under Yusuf it was, however, by no means a haven of pacifism, since he gained a reputation as a ruthless operator who jailed and on occasion killed opponents. Disputes with rivals often ended in gunfire. An associate said bluntly: "You're either with the colonel or you are an enemy."
He lost power there for a year before making a comeback, and was an important figure when 2002 saw the opening of internationally sponsored talks in Kenya aimed at restoring some semblance of order to the ravaged country. Two years of hard bargaining followed before Yusuf emerged as president, with UN backing, of what was called the Transitional Federal Government.
On assuming office he appealed from help from other African countries and the international community, saying his aims were disarmament, integration and restoration of the rule of law. He described the havoc wreaked by 14 years of conflict, saying: "Up to 300,000 people were killed during the war, about two million others were displaced and national institutions were destroyed. But it is my belief that if we all work together the timeframe of pacifying Somalia will be much shorter than anybody thought."
This hopeful assessment turned out to be hopelessly optimistic. The theory was that Yusuf would be strong enough to create an element of national unity, but from the start large parts of the country were outside his control. For several years it was too dangerous for him even to visit the capital, Mogadishu. He was also the target of several assassination attempts, one of which killed his brother and several bodyguards in 2006. Yusuf's years in office were thus unhappy ones both for himself and for Somalia: looked to as a strongman, he failed to assert authority and failed, too, to act as a unifying figure. His four years as president saw both a rise in violence and much infighting within his administration.
In 2006 the administration faced a major threat from a powerful Islamist movement which took control of much of south and central Somalia. He reacted by calling in Ethiopian military intervention, which was initially effective in propping up his government. But the memories of previous Somali-Ethiopian wars and the presence of soldiers from a Christian nation in a mainly Muslim country increased his unpopularity and further weakened his authority.
According to the BBC analyst Mohamed Mohamed, "In southern Somalia, he was viewed as someone who brought Somalia's enemy into Somali territory to fight his own brothers, instead of sorting out the political problems in a peaceful manner." The Ethiopian troops did not achieve peace, since the Islamists went on to stage an insurgency with the help of Eritrea. Some of the insurgents later, to international dismay, aligned themselves with Al-Qa'ida.
The international community became disillusioned with Yusuf and what was viewed as his habit of going for military solutions instead of negotiation: he came to be seen as too much of a warlord and not enough of a politician. In 2007 he convened a reconciliation conference in a heavily guarded police compound in Mogadishu, which passed upbeat resolutions but had little obvious effect in establishing lasting progress. The difficulty of making headway was illustrated when the compound came under mortar attack on several occasions.
The political end came for Yusuf in 2008 when he quarrelled with the prime minister Nur Hassan Hussein, who unlike Yusuf, but in line with most western opinion, favoured a broadly-based government which could include some moderate Islamists. When the Somali parliament overwhelmingly backed the prime minister the remnants of Yusuf's authority vanished and he resigned. Out of office, he initially lived in Puntland but moved to Dubai.
Abdullahi Yusuf Ahmed, politician: born Galkacyo, Puntland, Somalia 15 December 1934; President of Somalia 2004-08; married Hawa Abdi Samatar; died Abu Dhabi 23 March 2012.