In January and March 1993, representatives of 15 Somali factions signed peace and disarmament treaties in Addis Ababa, but by June the security situation had deteriorated. American and European forces, suffering an unacceptable number of casualties, were withdrawn by March 1994. The UN force was reduced to military units from mainly Third World countries, and the clan-based tensions that had precipitated the civil war remained unresolved.
In June and July 1993 UN peacekeepers and Somali citizens were killed in Mogadishu when the UN, encouraged by the United States, broadened its mandate to include capturing or killing Aidid. Heated dissension among member countries over the purpose of the UN's mission further confused the situation, and in March 1994 most US and European Union forces left Somalia. The same month, Aidid and Mahdi met in Kenya to form a joint government, but fighting broke out in Mogadishu in May and December. The remaining 19,000 UN troops left Somalia in March 1995. A stalemate persisted between Aidid and Mahdi, both of whom continued to occupy Mogadishu. The Somali Salvation Democratic Front (SSDF) controlled the northeast, and three lesser groups controlled other areas. Aidid was weakened when his powerful right-hand man Osman Hassan Ali switched his allegiance to Mahdi. Aidid died on August 1, 1996, from a battle wound and was succeeded by his son, Hussein Aidid (Aydid). Splet between political factions based on clans and subclans, Somaliea remained disunited, with a non-functioning government, in 1997-98 and into 1999; a split within the SSDF had led to the formation of a self-declared state (Puntland) in the northeast in 1998.