The interim government of Somalia and the Islamic movement which controls the country's capital have agreed to cease their military campaigns and to recognise each other.
Following their first round of direct high-level talks, held under Arab League sponsorship in Sudan's capital Khartoum today, the government and the Islamists signed a document meant to avert a confrontation that could extend years of conflict in Somalia.
It included a mutual commitment to suspend propaganda and military campaigns and continue talks without preconditions.
The interim government, which has little power and is based in the southern provincial town of Baidoa, recognised "the reality" of the Islamist movement, which in turn recognised "the legality" of the government.
The Islamic Courts Union (ICU), which drove warlords out of Mogadishu on June 5 and has since advanced into the hinterland, has not been directly at war with the government.
But the government said this week that it was expecting the Islamists to attack its Baidoa headquarters.
The signing ceremony in Khartoum was attended by Sudanese President Omar Hassan al-Bashir, Somali interim President Abdullahi Yusuf and Arab League Secretary-General Amr Moussa.
ICU chairman Sheikh Sharif Ahmed did not come in person but sent a 10-man delegation led by Mohamed Ali Ibrahim.
Bashir and Moussa were the main mediators in a day on which it was not clear until mid-afternoon whether the government delegation would agree to direct talks. In the morning the two Somali delegations had separate talks with mediators.