Dan Fodio's son, Muhammed Bello, established the empire's capital in Sokoto and it has remained the centre of Nigerian Islam ever since, with its huge mosque opposite the sultan's palace.
Part Gothic cathedral, part Teutonic fortress, part sultan's palace, its roofline is a riot of spires, beehive water towers and gaudily tiled domes, and its flanks are decorated with heraldic symbols and heroic-scale frescoes of the hospital's benefactors.
Our reporter says the crowds of mourners are likely to remain outside the sultan's palace for many weeks - some travelling from neighbouring Niger and other West Africa countries with large Muslim populations, such as Chad, Mali and Senegal.