The city was founded because of its strong defensive physical position by refugees trying to protect themselves against slave raiders from Dahomey, who were trying to benefit from the war.
Sporadic fighting continued with the people of Ota (1842), Ado (1844), Ibarapa (1849), Dahomey (1851), Ijebu-Ere (1851), Ijaye (1860–1862) and the Makun War of 1862–1864.
In 1904, an agreement was made where the British assumed jurisdiction in certain legal cases, and in the same year, the Alake Gbadebo paid a state visit to England.
Over the following years, the British steadily assumed more responsibility for administration while continuing to formally recognize the Egba state.
[9] In 1949, as a result of agitation by the women's rights leader Chief Funmilayo Ransome Kuti, the Alake Ladapo Ademola was forced to abdicate.