Around 1000 A.D, Hausa speaking people in northern Nigeria began to organize themselves in walled cities (Birni) and were ruled by a local king (Sarki). By 1200 A.D, some of these cities had begun to emerge into states and Islam slowly filtered into the Hausa states beginning in the 14th century. By the 15th century, the Hausa state of Kano had become one of the most important centers of trade in Africa and remains till today, an important center of trade and Islamic education in West Africa.
In each Hausa state, a monarch ruled over a network of feudal lords, most of whom had embraced Islam by the 14th century. The states maintained persistent rivalries, which at times made them easy prey to the expansion of Bornu and other kingdoms. A perhaps greater, if more subtle, threat to the Hausa kingdom was the immigration of Fulani pastoralists, who came from the west to make a home in the Nigerian savanna permeating large areas of Hausaland over several centuries. The result of which led to the strengthening presence of Islam in the region starting in the 15th century.
In 1804, a Fulani scholar, Usman dan Fodio, waged a jihad (holy war) in regions whose rulers he condemned for allowing the deterioration of Islamic practices. Local Fulani leaders, motivated by both spiritual and local political concerns, received Usman’s blessing to overthrow the Hausa rulers, and with their superior cavalry and cohesion, they overthrew the Hausa rulers and even conquered areas beyond Hausaland, including Adamawa to the east and Nupe and Ilorin to the south, further extending the conversion of the masses to Islam. The conquered territories were collectively known as the Sokoto Caliphate, even throughout the colonial period. The war brought about a loose federation of 30 emirates, each recognizing the supremacy of the Sultan of Sokoto, who resided in north-western Nigeria. Usman dan Fodio became the first Sultan of Sokoto and after his death in 1817, he was succeeded by his son, Muhammad Bello. Militarily and commercially powerful, the Sokoto caliphate will go on to dominate the region throughout the 19th century.