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
Yoruba people ancient times, most of these cities were fortresses, with high walls and gates. Yoruba cities have always been among the most populous in Africa. Archaeological findings indicate that Òyó-Ilé or Katunga, capital of the Yoruba empire of Oyo (fl. between the 11th and 19th centuries CE), had a population of over 100,000 people (the largest single population of any African settlement at that time in history). For a long time also, Ibadan, one of the major Yoruba cities, was the largest city in the whole of Sub Saharan Africa. Today, Lagos (), another major Yoruba city, with a population of