The military history of Somalia encompasses the major conventional wars, conflicts and skirmishes involving the historic empires, kingdoms and sultanates in the territory of present-day Somalia, through to modern times. It also covers the martial traditions, military architecture and hardware employed by Somali armies and their opponents. Ancient sources refer to a major military alliance between the Kingdom of Kush and one of its allies, the Kingdom of Punt, against the armies of Ancient Egypt. In the early Middle Ages, the Ajuran Empire expanded its territories and established its hegemonic rule through a skillful combination of warfare, trade linkages and alliances, and defeated the Portuguese many times in the Indian Ocean. The Kingdom of Ifat successfully conquered the Kingdom of Shewa in the same time-period. A hundred years later a major conventional war would commence during the Conquest of Abyssinia pitching the Kingdom of Adal allied by the Ottoman Empire against the Solomonic Dynasty supported by the Portuguese Empire. The conflict is the earliest example of cannon and matchlock warfare on the continent. The early modern period saw the rise and fall of the Gobroon Dynasty, a southern military power that successfully subdued the Bardera militant's and forced the Omanis to pay tribute. This period also saw an increased focus by Global Empires on colonial expansion. The three major imperial powers of Britain, Italy and France consequently sought and signed various protectorate treaties with the ruling Somali Sultans, such as Mohamoud Ali Shire of the Warsangali Sultanate, Osman Mahamuud of the Majeerteen Sultanate and Yusuf Ali Kenadid of the Sultanate of Hobyo. Supplied with military hardware by the European powers, the Ethiopian Empire also sought to expand its own influence in the Horn region. These competing influences gave birth to the Dervish State, a polity wherein the monarch was Diiriye Guure, whilst its emir was Sayyid Mohammed Abdullah Hassan ("The Mad Mullah"). The Dervish forces successfully repulsed the British Empire in four military expeditions and forced it to retreat to the coastal region, remaining independent throughout World War I. After a quarter of a century of holding the British at bay, the Dervishes were finally defeated in 1920, when Britain for the first time in Africa used airplanes to bomb the Dhulbahante garesas at the Dervish capital of Taleh. World War II saw many Somali men join Italian forces during the Second Italo-Abyssinian War and during the East African Campaign;