The Somali Armed Forces are the military forces of the Federal Republic of Somalia. Headed by the president as commander-in-chief, they are constitutionally mandated to ensure the nation's sovereignty, independence and territorial integrity. The SAF was initially made up of the Army, Navy, Air Force and Police Force. In the post-independence period, it grew to become among the larger militaries in Africa. Due to Barre's increasing reliance on his own clans, repressive policies, and the Somali Rebellion, the military had by 1988 begun to disintegrate. By the time President Siad Barre fled Mogadishu in January 1991, the last cohesive army grouping, the 'Red Berets,' had deteriorated into a clan militia. An unsteady rebuilding process began after 2000. In January 2014, the security sector was overseen by the Federal Government of Somalia's Ministry of Defence, Ministry of National Security, and Ministry of Interior and Federalism. The northeastern region of Puntland maintains its own separate military force. History Middle Ages to colonial period Historically, Somali society conferred distinction upon warriors (waranle) and rewarded military acumen. All Somali males were regarded as potential soldiers, except for men of religion. Somalia's many sultanates each maintained regular troops. In the early Middle Ages, the conquest of Shewa by the Ifat Sultanate ignited a rivalry for supremacy with the Solomonic dynasty. Many similar battles were fought between the succeeding Sultanate of Adal and the Solomonids, with both sides achieving victory and suffering defeat. During the protracted Ethiopian-Adal War (1529–1559), Imam Ahmad ibn Ibrahim al-Ghazi defeated several Ethiopian Emperors and embarked on a conquest referred to as the Futuh Al-Habash ("Conquest of Abyssinia"), which brought three-quarters of Christian Abyssinia under the power of the Muslim Adal Sultanate. Al-Ghazi's forces and their Ottoman allies came close to extinguishing the ancient Ethiopian kingdom, but the Abyssinians managed to secure the assistance of Cristóvão da Gama's Portuguese troops and maintain their domain's autonomy. However, both polities in the process exhausted their resources and manpower, which resulted in the contraction of both powers and changed regional dynamics for centuries to come. Many historians trace the origins of hostility between Somalia and Ethiopia to this war. Some scholars also argue that this conflict proved, through their use on both sides, the value of firearms such as the matchlock musket, cannons and the arquebus over traditional weapons. At the turn of the 20th century, the Majeerteen Sultanate, Sultanate of Hobyo, Warsangali Sultanate and