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 preventing the Alaafin from being an autocrat; the Oyo Mesi compelled many Afaafin to commit suicide during the 17th and 18th centuries. The head of the council of Oyo Mesi, the Bashorun, consulted the Ifa oracle for approval from the gods. New alaafins of Oyo were seen as appointed by the gods. They were regarded as "Ekeji Orisa," meaning "companion of the gods." The Bashorun had final say on the nomination of the new Alaafin, his power rivaling the king himself. For example, the Bashorun orchestrated many religious festivals; in addition to being commander-in-chief of the army, which gave him