History of Africa usually governed by an "oba" and an "iwarefa", a council of chiefs who advised the "oba." by the 18th century, the Yoruba city-states formed a loose confederation, with the "Oni" of Ife as the head and Ife as the capital. As time went on, the individual city-states became more powerful with their "obas" assuming more powerful spiritual positions and diluting the authority of the "Oni" of Ife. Rivalry became intense among the city-states. The Oyo Empire rose in the 16th century. The Oyo state had been conquered in 1550 by the kingdom of Nupe, which was in possession of cavalry,
Islam in Nigeria built in Ọyọ-Ile in AD 1550 although, there were no Yoruba Muslims, the Mosque only served the spiritual needs of foreign Muslims living in Ọyọ. Progressively, Islam came to Yoruba land, and Muslims started building Mosques: Iwo town led, its first Mosque built in 1655 followed by Iṣẹyin, in 1760; Lagos, 1774; Ṣaki, 1790; and Oṣogbo, 1889. In time, Islam spread to other towns like Oyo (the first Oyo convert was Solagberu), Ibadan, Abẹokuta, Ijẹbu-Ode, Ikirun, and Ẹdẹ before the 18th century Sokoto jihad. Several factors contributed to the rise of Islam in Yoruba land by mid 19th century. Before