I've been reading Steven Weinberg's 'Lake Views: this world and the universe'. It's a lucid collection of essays and other writings. In the chapter, Without God, Weinberg discusses the 12th century Sufi philosopher Abu Hamid al-Ghazali [1058-1111 CE] who wrote The Incoherence of the Philosophers, and who had a considerable impact on attitudes to science within Islam. Weinberg says that al-Ghazali argued against ...
"the very idea of the laws of nature, on the grounds that any such law would put God's hands in chains. According to al-Ghazali, a piece of cotton placed in a flame does not darken and smoulder because of the heat of the flame, but because God wants it to darken and smoulder."
Weinberg adds that the laws of nature could have been reconciled with Islam, as a summary of what God usually wanted to happen, but al-Ghazali did not take that path.
This is, of course, a line of argument that can never be successfully refuted by rationality. It reminds me of a comment made to me by a member of the Plymouth Brethren immediately after the first moon landing. Having spent weeks saying that God would not allow the landings (I quite forget why), she immediately pronounced that God had been merciful. Faith is such.
It seems that Al-Ghazali also said that although astronomy and mathematics strengthen the mind, we:
"nevertheless fear that one might be attracted through them to doctrines that are dangerous."
Indeed. It's a bit more subtle that this, of course, and Jim Al-Khalili's Pathfinders; the golden age of Arabic science gives more of the background and detail.