The mediaeval western European church had hitched its wagon very tightly to the philosophy of Aristotle, and by extension to the astronomical model of Ptolemy. This caused Galileo no small amount of aggro. One of the greatest mathematicians and physicists of Mediaeval Islam, namely Abu Ali al-Hasan ibn al-Haytham, (965-1040) encountered a similar problem. I won't woffle, but take you straight to a reply of his to an anonymous scholar who had criticized his treatise The Winding Motion:
From the statements made by the noble Shaykh, it is clear that he believes in Ptolemy’s words in everything he says, without relying on a demonstration or calling on a proof, but by pure imitation (taqlîd); that is how experts in the prophetic tradition have faith in Prophets, may the blessing of God be upon them. But it is not the way that mathematicians have faith in specialists in the demonstrative sciences. And I have taken note that it gives him (i.e. noble Shaykh) pain that I have contradicted Ptolemy, and that he finds it distasteful; his statements suggest that error is foreign to Ptolemy. Now there are many errors in Ptolemy, in many passages in his books. Among others, what he says in the Almagest: if one examines it carefully one finds many contradictions. He (i.e. Ptolemy) has indeed laid down principles for the models he considers, then he proposes models for the motions that are contrary to the principles he has laid down. And this not only in one place but in many passages. If he (i.e. noble Shaykh) wishes me to specify them and point them out, I shall do so. I resolved to write a book to establish the truth in the science of astronomy; in it I show the contradictory passages in the Almagest, then the correct passages, and I show how to correct the [faulty] passages. He made many mistakes in the Book on Optics, one of which was a mistake in the proof concerning the shape of mirrors, which shows how uncertain his grasp was. As for his Book on Hypotheses, if one examines the notions he propounded in the second chapter and the models he put forward using spheres and parts of spheres, the demonstration [of the models] is immediately seen to be refuted and flawed. In my reply I have shown his error in regard to the two parts of the sphere, which he postulated for the epicycle, and I have explained with an irrefutable demonstration; and I have shown that, whatever cases one postulates for the [two] parts of spheres, one obtains an indefensible impossibility.
Translated by Roshdi Rashed