Societies simply cannot continue tearing themselves apart in civil conflict forever. There comes a point when the seemingly interminable warring comes to a halt. This happens less often through a shining vision of the broad sunlit uplands of peace than general weariness with violence and a redefining of self-interest by the contesting groups.

This is what is taking place now in Somalia after 13 years of hugely destructive civil war. Last month the warring parties formed a Parliament that represents virtually all of them. Now that Parliament has chosen a president, Abdullahi Yusuf Ahmed, a former army commander who has led the semi-autonomous Somali region of Puntland.

On the face of it President Ahmed faces a truly daunting task. Central government ceased to exist after President Siad Barre was ousted in 1991 after 22 years of crack-pot “scientific socialist” policies. The subsequent fighting has wrecked much of the capital Mogadishu. Almost all government records and infrastructure have been destroyed. Though rivals clan leaders have signed up to the peace deal, the gunmen on the street have become used to a life of roadblock tolls and extortion. Thugs who are reluctant to give up a way of life where the Kalashnikov has been king may yet challenge the delicate new arrangements.

With no police, no judiciary and no civil servants, the coming months will be a considerable challenge. The new president will have to seek consensus for all his changes. Progress will be slow and there are likely to be setbacks. His former opponents will be watching carefully for any sign that he is seeking to establish his own position at their expense. On the face of it, there is every reason why the new arrangements could come unraveled. Four years ago warlords chose Abdulkassim Salat Hassan as a transitional president who was greeted in Mogadishu with wild celebrations. Within a year, however, the factional fighting had resumed when Hassan sought to assert his government’s tenuous authority. That fighting led to the breakaway of the former British-ruled Somaliland in the north whose leaders have not been party to the new Parliament and the choice of President Ahmed.

There seems little danger that Washington will risk a repeat of its humiliating failed military intervention in 1992. Somalis must be left to work out their own future, though this does not mean that outside countries, including the UN and members of the Arab League which Somalia joined in 1974 should not offer every other type of assistance. One of the remarkable circumstances of the long years of chaos has been the triumph of the Somali commercial genius. From the corrupt and bungling command economy of Siad Barre the country has been plunged into a completely unregulated free market. Though many people, especially those who have fled to the shanties of the capital from rural violence live in poverty, most goods and services are readily available from private businesses, often funded from the million Somalis who have fled abroad. The basis for recovery, therefore, exists if only the peace can survive.