The northern Nigerian city of Gobir itself faced a powerful threat from the Fulanis. Austere and fanatical in their religion, they no longer tolerated the laxness and growing corruption of the Hausa rulers. In 1804 they revolted against these regimes declaring jihad on the rulers. William Winwood Reade, author of The Martyrdom of Man, gave an account of the relevant facts: "Othman [sic] Dan Fodio, the Black Prophet … went out of Mecca, his soul burning with zeal. He determined to reform the Sudan [i.e. that part of Africa] … Dan Fodio sent letters to the great kings of Timbuktu, Haoussa [sic], and Bornu [sic], commanding them to reform their own lives and those of their subjects, or he would chastise them in the name of God … Dan Fodio united the Fulah [i.e. Fulani] tribes into an army which he inspired with his own spirit. Thirsting for plunder and paradise, the Fulahs swept over the Sudan; they marched into battle with shouts of frenzied joy, singing hymns and waving their green flags on which texts of the Koran were embroidered in letters of gold."
Many ordinary Hausas joined the Fulani campaigns. They empathised with the Fulani attack on the luxury, injustice, and high taxation associated with the Hausa Sarkunas (i.e. kings - plural). Moreover, the government officials were not above confiscating livestock and other goods of ordinary people. Nor were they above capturing young women to serve in the harem.
In 1812 the Shehu (meaning 'teacher'), Uthman Dan Fodio triumphed over the Hausa kings. Ruling from Gobir, he changed the name of the city to Sokoto. The empire he built became the Sokoto Caliphate. Establishing a centralised government, he began a stability in the region that ultimately created an economic boom. Hausaland had seen nothing like it since the fifteenth and sixteenth centuries. Kano cotton, for example, clothed half of West Africa. Furthermore, the Shehu and his descendants were scholars of impressive intellects. Dr Davidson wrote that: "To Uthman, his brother Abdullah and his son Muhammad Bello are attributed some 258 books and essays on a variety of theoretical and practical subjects".