Islamists who control Somalia's capital and the country's weak government have agreed to form a unified, national army and police force.
The four-point agreement was reached Monday in the third day of talks in Sudan's capital Khartoum. It also says the Islamists and the government will co-exist peacefully, rejecting interference by neighboring entities.
The two sides also agreed to meet again October 30 for talks on power-sharing.
The Arab League had sponsored the talks in hopes of avoiding greater chaos in the mostly lawless Horn of Africa country.
The agreement says nothing about the Somali government's repeated requests for outside peacekeepers, which the Islamists oppose. That issue is due to be discussed Tuesday at a special summit of regional leaders - the Intergovernmental Authority on Development - in Nairobi.
Since June when the Islamists seized Somalia's capital, the government has remained virtually powerless outside its base of Baidoa while militias loyal to Islamic courts have seized control over much of southern Somalia.
In Baidoa Monday, a clash between Somali government forces and militiamen left at least five people dead.
Shooting broke out at Baidoa's airport when police moved in to evict militia that had set up checkpoints to extract money from travelers. Witnesses say all of the dead were militiamen.
Somalia has not had an effective central government since the fall of dictator Mohamed Siad Barre in 1991.
Some information for this report was provided by AFP, AP and Reuters.