After Are-Ona-Kakanfo Afonja was murdered and Ilorin was seized by the Fulani Jamma, Alimi (the son of Abdul Salam) became the first Fulani ruler of Ilorin not with the title of Oba or Baale but Emir which solidifies that the total control of Ilorin, a Yoruba town had gone to the Fuanis. In a bid to restore the control of Ilorin in the hands of the Yorubas, Toyeje, the Baale of Ogbomoso and the new Are-Ona-Kakanfo, led an attack on Ilorin to expel the Fulanis, but unfortunately, he failed drastically. After sometime, between the months of March and April (when locus fruit i.e Igba was ripe for harvest), another attempt was made by the Yorubas to chase the intruding Fulanis out of Ilorin but failed again.
During this period, the whole land was already devastated by the previous wars and consequently there were no farms for foraging. Ilorin had also ran out of food, so both the besieged and besiegers had no food to eat than locust fruit (igba). Hence the war was named Mugbamugba.
The Yorubas suffered untold defeat in the Mugbamugba war. They did not know how to handle the Fulani cavalry and the Fulanis were expert horsemen. Monija, the king of Rabbah and a mercenary fighting on the side of the Yorubas, fled to his town leaving the Yorubas at the mercy of their victors. To crown their victory, the Fulanis of Ilorin attacked all towns in the direction of Offa, Erinle, Igbona etc. the Olofa with Asegbe, his Ilari, escaped to Ikoyi.
Johnson, Samuel; The History of the Yorubas; Lagos; CSS Limited; 1921; pg. 80-81