Colonial pressure drove Muslim empires toward modernization and Westernization [causal]
The turn toward secularization and modernization was spurred on by the spread of capitalism and the encroachment of colonialism on various Muslim empires. In fact, it was only during the era of capitalist development that Islam finally ceased to play a central role in social organization. In response to the loss of their territories to European colonial powers, the Muslim rulers of the Ottoman, Egyptian, and Persian Empires introduced programs of modernization, capitalistic reforms, and Westernization.
Deepa Kumar, Islamophobia and the Politi…, loc. 298