There is an anecdote about Christianity entering Africa, attributed to Archbishop Desmond Tutu (although the current author has also seen it attributed to Jomo Kenyatta), which goes like this.
When the white man first came to our lands he had the bible and we had the land. He said, ‘close your eyes and let us pray’. When we opened our eyes again, we had the bible and he had the land.
The introduction of Islam to Africa (eighth and ninth centuries) certainly predates Christianity's introduction, and, although the dynamics of its introduction may differ in detail, the basic process of its being introduced alongside political, economic and military ambitions is likely to have been similar. As was seen in Chapter 7, Islam was also disposed towards trade and enterprise, and perhaps towards a proselytizing zeal, like Protestant Christianity, to spread the Word alongside the acquisition and protection of trade routes, the spread of commercial interests, the subjugation in some form of indigenous populations, and assimilation and taking over of existing religious beliefs.
Yet it is unlikely that the ‘foreign invader’ was able to forcibly introduce a foreign religion on local people, if there did not previously exist some predisposition towards religiosity: although Britain's failure to introduce Christianity into India certainly challenges this assumption, so clearly other factors had to be in place.