sentences:  Through a strong centralized administration and an aggressive military stance towards invaders, the Ajuran Empire successfully resisted an Oromo invasion from the west and a Portuguese incursion from the east during the Gaal Madow and the Ajuran-Portuguese wars.Trading routes dating from the ancient and early medieval periods of Somali maritime enterprise were strengthened or re-established, and foreign trade and commerce in the coastal provinces flourished with ships sailing to and coming from many kingdoms and empires in East Asia, South Asia, Europe, the Near East, North Africa and East Africa.The empire left an extensive architectural legacy, being one of the major medieval Somali powers engaged in castle and fortress building.