History of the Yoruba people military capital of Ilorin, and then sacked and destroyed Ọyọ-Ile, the royal seat of the Ọyọ Empire. Following this, Ọyọ-Ile was abandoned, and the Ọyọ retreated south to the present city of Oyo (formerly known as "Ago d'Oyo", or "Oyo Atiba") in a forested region where the cavalry of the Sokoto Caliphate was less effective. Further attempts by the Sokoto Caliphate to expand southwards were checked by the Yoruba who had rallied in defence under the military leadership of the ascendant Ibadan clan, which rose from the old Oyo Empire, and of the Ijebu city-states. However, the Oyo hegemony had
Oyo Empire or Oyo-oro). The two most important structures in Oyo-Ile were the 'Afin,' or palace of the Oba, and his market. The palace was at the center of the city close to the Oba's market called 'Oja-Oba'. Around the capital was a tall earthen wall for defense with 17 gates. The importance of the two large structures (the palace and the Oja Oba) signified the importance of the king in Oyo. Oyo had grown into a formidable inland power by the end of the 14th century. For over a century, the Yoruba state had expanded at the expense of its neighbors.