During the Middle Ages, Kismayo and the surrounding area known as Jubaland were part of the Ajuran Empire, a Somali sultanate that ruled over large parts of the Horn of Africa and dominated trade in the Indian Ocean.
The Ajuran Empire had a strong, centralised administration and aggressive military strategy, which enabled it to resist an Oromo invasion from the west and a Portuguese incursion from the east during the Gaal Madow and the Ajuran-Portuguese wars.