Ilorin and the Fall of Old Oyo cannot be understood as a simple story of betrayal, foreign invasion or sudden conquest. The transformation unfolded over several decades. It began amid a severe political crisis inside the Oyo Empire, continued with Afonja’s establishment of a military base at Ilorin, and entered a new phase with migration, Muslim mobilisation, the rise of Abd al Salam and Ilorin’s eventual connection to the Sokoto Caliphate through Gwandu.
By the time Ilorin forces advanced towards Osogbo in the late 1830s, the settlement had become something very different from the place Afonja had entered around 1796. It was now an organised military and political power capable of projecting force deep into Yorubaland.
The transformation of Ilorin therefore belongs to the wider history of Old Oyo’s decline. It also explains why the confrontation at Osogbo, generally dated to around 1840, became so important. The battle checked Ilorin’s southward advance and helped establish Ibadan as the dominant military power in much of the post Oyo political order.
Ilorin and the Fall of Old Oyo: Why the Frontier Mattered
Ilorin stood in the northern Yoruba region, within an ecological and political frontier shaped by Oyo’s influence. Old Oyo had built much of its military strength around cavalry, which was particularly effective in the open savannah. Horses were obtained largely through northern networks, while dense forest farther south restricted the advantages of mounted warfare.
Ilorin had settlements before Afonja’s arrival, although traditions differ over its earliest inhabitants, founders and political organisation. Accounts name different individuals and groups associated with its early development, suggesting that the town emerged through several phases rather than from a single act of foundation.
Its extraordinary political importance developed mainly during the crisis surrounding Afonja.
Ilorin did not become a threat to Oyo because a fully developed imperial fortress simply changed allegiance. Its transformation into a major military centre occurred as Oyo’s central authority weakened and Afonja built an increasingly independent power base there.
Afonja and the Crisis of Oyo
Afonja was the Aare Ona Kakanfo, one of the most important military officeholders in the Oyo political system. The title carried immense military prestige and made its holder one of the empire’s leading military commanders.
By the reign of Alaafin Aole, usually dated from about 1789 to 1796, Oyo was facing serious political conflict. The Alaafin’s relations with powerful chiefs deteriorated, military leaders possessed substantial independent influence, and the ability of the political centre at Oyo Ile to impose its authority was weakening.
Afonja became one of the central figures in this crisis.
His establishment at Ilorin is generally placed around 1796, during the political upheavals surrounding the closing years of Aole’s reign. Accounts of Afonja’s earlier relationship with Ilorin differ, making it difficult to portray him as the long established ruler of a major Ilorin province before his rebellion.
EXPLORE NOW: Democratic Nigeria
Once established there, however, Afonja turned the area into the principal base of his military power.
His decisive separation from Oyo occurred around 1796 or 1797. This chronology is important because Afonja’s revolt and the later Muslim political transformation of Ilorin were separated by many years.
Afonja’s revolt did not begin in 1817.
The Twenty Year Gap That Changed Ilorin
The period between about 1797 and 1817 was crucial.
For roughly two decades, Afonja’s Ilorin developed while the political authority of Old Oyo remained severely weakened. Ilorin attracted soldiers, migrants and communities seeking opportunities or escaping difficult conditions elsewhere.
Among those drawn into this changing environment were Yoruba migrants, Hausa and Hausa speaking Muslims, people who had escaped servitude within Oyo territory, northern traders and artisans, Kanuri elements, Fulani pastoralists and other groups.
Some became part of Afonja’s military following, commonly described in historical accounts as his Jama’a.
The presence of northern and Muslim elements in Afonja’s military system therefore preceded the permanent arrival of the Fulani cleric Alimi in 1817.
Ilorin was developing into a cosmopolitan frontier society in which ethnicity, religion, military service, migration and political ambition overlapped. Its population could not be divided neatly into two opposing ethnic blocs.
Alimi and the Transformation of Ilorin
Alimi, an influential Fulani Muslim scholar, became one of the central figures in the transformation of Ilorin.
His relationship with Afonja appears to have developed in stages. Traditions connect him with Afonja during conflicts around the turn of the nineteenth century, while his permanent settlement in Ilorin is generally placed around 1817.
His presence strengthened a Muslim community that already included people from several backgrounds.
The years after 1817 brought further demographic and political change. Muslim influence expanded, while additional Fulani groups, including people affected by the wider jihad movements and conflicts in northern regions, reached Ilorin during the early 1820s.
Afonja had benefited from the military strength of diverse followers, but this diversity also produced competing centres of authority.
Ilorin was not governed throughout Afonja’s era as a tightly centralised state under one ruler. Different communities possessed influential leaders of their own. Afonja remained the foremost military figure, while Alimi acquired substantial religious authority among the Muslim population.
Over time, these competing sources of influence altered the political balance within Ilorin.
Abd al Salam and the Rise of the Ilorin Emirate
Alimi died around 1823. His eldest son, Abd al Salam, subsequently emerged as the leading figure of Ilorin’s increasingly unified Muslim political community.
Abd al Salam became the first Emir of Ilorin around this period.
His rise occurred before the final defeat of Afonja and formed part of the struggle over who would control Ilorin.
Relations between Afonja and the Muslim coalition deteriorated sharply. Afonja became increasingly concerned about the growing independence and political influence of the groups associated with the Muslim community.
The struggle eventually developed into armed conflict.
Accounts differ over the precise circumstances of Afonja’s death. He died during the struggle for Ilorin around 1824, bringing an end to the political order he had established there.
The victory of Abd al Salam and his supporters established a new phase in Ilorin’s history. The settlement that had served as Afonja’s military base became an emirate under Muslim leadership.
Ilorin subsequently entered the political structure of the Sokoto Caliphate through Gwandu, which exercised authority over the western emirates within the caliphal system.
This relationship developed after Afonja had already broken from Oyo. His original revolt in the 1790s should therefore be distinguished from Ilorin’s later position within the Sokoto political system.
How Ilorin Accelerated the Collapse of Old Oyo
The fall of Old Oyo was not caused by Ilorin alone.
The empire had already suffered serious internal political instability, disputes among senior political figures, provincial resistance and military difficulties before Ilorin became an emirate. The weakening of central authority created conditions in which regional military leaders could operate with increasing independence.
Afonja’s revolt deepened that instability.
EXPLORE NOW: Military Era & Coups in Nigeria
The subsequent transformation of Ilorin into an emirate created an even more serious military threat. Ilorin could challenge remnants of Oyo authority while expanding its own sphere of influence.
Old Oyo’s final decline therefore resulted from interacting pressures. Internal fragmentation weakened the imperial centre. Rebellion reduced its ability to control important territories. Warfare devastated communities, while Ilorin emerged as a powerful military state on what had once been Oyo’s northern frontier.
By the 1830s, the old political order centred on Oyo Ile was collapsing beyond recovery.
The consequences extended across Yorubaland. Population movements reshaped towns and communities as refugees, warriors and political leaders searched for security and new centres of authority.
One of the most important settlements to rise from this turbulent period was Ibadan.
The Rise of Ibadan
Ibadan developed during the upheavals that followed the weakening of Oyo and the wider nineteenth century Yoruba wars.
Its population included warriors and refugees from different Yoruba communities. Military leaders became central to its political organisation, and the town rapidly developed into one of the strongest military powers in the region.
Its rise was directly connected to the political vacuum left by the decline of Old Oyo.
As Ilorin projected its influence southwards, Ibadan increasingly became one of the principal forces capable of resisting further expansion.
The rivalry between these emerging powers eventually brought them into confrontation around Osogbo.
The Road from Ilorin to Osogbo
After the collapse of Old Oyo’s authority, Ilorin continued to project military influence southwards.
This advance brought its armies into conflict with the emerging military powers of the Yoruba interior. Ibadan became central to resistance against further Ilorin expansion.
Osogbo became one of the decisive points in that struggle.
The Battle of Osogbo is commonly dated to around 1840, although some historical chronologies place it around 1838.
Ilorin forces had moved southwards and threatened Osogbo. Ibadan responded by sending a military force against them.
The Ibadan army defeated the Ilorin forces.
The result carried consequences far beyond the battlefield.
Ilorin remained an important regional power, but its drive farther south had encountered a formidable military barrier. Ibadan gained greater prestige and strengthened its position as one of the leading military powers of nineteenth century Yorubaland.
The confrontation also demonstrated how dramatically the political landscape had changed since the final decades of the eighteenth century.
Old Oyo had once dominated much of the region.
By the period of the Osogbo conflict, new states and military centres were competing for territory, population and political influence.
The road from Afonja’s establishment at Ilorin to the confrontation at Osogbo had taken more than four decades.
Beyond the Simple Story of Afonja and the Fulani
The history is sometimes compressed into a story in which Afonja rebelled against Oyo, invited Alimi and his Fulani followers into Ilorin and was almost immediately overthrown.
The chronology was much longer.
Afonja established himself at Ilorin around 1796. His effective break with Oyo followed around 1796 or 1797. Alimi’s permanent settlement occurred around 1817, approximately two decades later. Abd al Salam emerged as emir around 1823, and Afonja died during the subsequent struggle around 1824.
EXPLORE NOW: Biographies & Cultural Icons of Nigeria
The political transformation of Ilorin therefore occurred in stages.
The conflict also involved far more than two ethnic groups. Ilorin contained Yoruba Muslims and non Muslims, Hausa and Hausa speaking migrants, Fulani clerics and pastoralists, Kanuri elements, former slaves, traders, soldiers and other communities.
Religious allegiance, military loyalty, social position and political interest could be as important as ethnic background.
Likewise, the transformation of Ilorin should not be presented as a campaign directed from Sokoto from the beginning. Ilorin’s eventual place within the Sokoto Caliphate was important, but it developed after Afonja’s original rebellion against Oyo.
Conclusion
Ilorin and the Fall of Old Oyo is a story of prolonged political transformation rather than a single act of betrayal or conquest.
Ilorin’s geographical position gave it strategic advantages, but geography alone did not create the power that eventually emerged there. Oyo’s internal crisis opened the political space. Afonja transformed Ilorin into an independent military base. Migration enlarged its population and fighting strength. Alimi became a major religious leader. Abd al Salam’s rise established the emirate, which later became linked through Gwandu to the Sokoto Caliphate.
These developments changed Yorubaland.
What began with political conflict inside Old Oyo developed into decades of warfare, migration and state formation. The old imperial system weakened while new centres of power emerged.
By around 1840, when Ilorin’s southward advance was checked at Osogbo by Ibadan, the political world in which Afonja had first rebelled had largely disappeared.
Ilorin had survived Afonja and become a durable emirate.
Ibadan had emerged as a formidable military power.
Old Oyo had ceased to dominate the political landscape.
Author’s Note
The transformation of Ilorin shows how the collapse of a great empire can create new political forces whose influence extends far beyond the crisis that produced them. Oyo’s internal divisions gave Afonja room to establish an independent base, while migration, warfare and religious organisation gradually transformed that base into the Ilorin Emirate. The rise of Abd al Salam and the later connection with Gwandu created a political order very different from Afonja’s original military camp. Ilorin’s subsequent expansion and its confrontation with Ibadan at Osogbo marked another stage in the remaking of nineteenth century Yorubaland. The lasting lesson is that the fall of Old Oyo and the rise of Ilorin were connected processes shaped over decades by political fragmentation, military ambition, population movement and changing alliances.
References
Robin Law, The Oyo Empire, c. 1600 to c. 1836: A West African Imperialism in the Era of the Atlantic Slave Trade, Clarendon Press, Oxford, 1977.
Ismail Otukoko Salihu, “Aare Ona Kakanfo Afonja, c. 1796 to c. 1824: An Interrogation of the Historiography of a Critical Chapter of Ilorin History”, The Journal of African Studies and Research Forum, Vol. 33, No. 3, 2024, pp. 64 to 83.
Aribidesi Usman and Toyin Falola, The Yoruba from Prehistory to the Present, Cambridge University Press, 2019.

