Located in parts of Nigeria, Niger, Cameroon and Chad, the Kanem-Bornu Empire had been in decline since the mid-1700s. The result was the rise of a number of independent Hausa kingdoms throughout the region. Warfare between the Hausa states were constant during the latter 1700s.  This, in turn, led to a harsh system of conscription and taxation to support the armies that conscription built.
 
The Fulani, a pastoral people, were often the victims of Hausa control.  The Fulani War of 1804-1808 began when Usman dan Fodio, a prominent Islamic scholar and teacher, was exiled from the Hausa state of Gobir by the King Yunfa, one of his former students.
 
In response, Usman dan Fodio assembled a Fulani army, which he lead in battle against the Hausa kingdoms of the northern of Nigeria. The forces of Usman dan Fodio slowly conquered the Hausa kingdoms, ending with the capture of Gobir in 1808 and the subsequent execution of Yunfa. 
 
The war resulted in the creation of a Caliphate in Sokoto, in present day north-western Nigeria.  It was led by Usman dan Fodio, and became one of Africa's largest states in Africa in the 1800s. His success inspired similar jihads in Western Africa.
 
The Caliphate continued until 1903, when the British conquest of Nigeria led to its loss of political power.  Though diminished in political authority, the Caliphate continues to have considerable spiritual authority.