No single person or idea ended it. The Muslim historians who lived through the decline blame political division, the Crusades, the Mongol invasions and, later, plague and lost trade. Al-Ghazali, who usually gets the blame, wrote that mathematics is proven knowledge that no one should deny and that medicine is a duty the community must fulfil. Science also did not stop in 656 AH / 1258 CE: some of the finest astronomy in Islamic history came after it.
The golden age itself is told on Athar in the Abbasids and the Golden Age, from the House of Wisdom under al-Ma'mun to the work of al-Khwarizmi and Ibn Sina. This page asks the harder question: why did it fade, and how far did it really fade?
Did al-Ghazali kill science?
The popular claim runs like this: al-Ghazali (died 505 AH / 1111 CE) attacked the philosophers, Muslims stopped thinking, and science died. His own books tell a different story.
On mathematics. In al-Munqidh min al-Dalal, his autobiography, al-Ghazali divides the philosophers' sciences into six kinds. Of mathematics (arithmetic, geometry and astronomy) he says nothing in it touches religion, for or against, and that these are matters of proof which cannot be denied once they are understood.
He then names two dangers. The first is that a student, dazzled by the rigour of mathematics, assumes the philosophers' metaphysics is just as proven and drifts from faith. The second is "a friend of Islam who is ignorant," who thinks religion is helped by denying every science linked to the philosophers, even their account of eclipses. Al-Ghazali calls this a great crime against the religion: anyone who knows the proof will conclude that Islam is built on ignorance. He points out that the Prophet ﷺ said the sun and moon do not eclipse for anyone's death but are two of God's signs (Sahih al-Bukhari 1041, from Abu Mas'ud; graded sahih by al-Bukhari through its inclusion in his Sahih), and that nothing in this rules out calculating their motion. He even notes that an extra phrase some people added to that hadith is not found in the Sahih at all.
On medicine. Turning to the natural sciences, he says that just as religion does not require anyone to deny medicine, it does not require denying the study of nature either, apart from specific points he set out in Tahafut al-Falasifah. Those points were metaphysical (for example, bodily resurrection), and his basic principle was that nature works by God's command, not by itself.
In the Ihya' 'Ulum al-Din he goes further. Medicine and arithmetic are fard kifaya, communal obligations: medicine because bodies need it, arithmetic because trade, wills and inheritance depend on it. If a town has no one doing them, the whole town is at fault. Then he scolds his fellow scholars: how many towns have no doctor except non-Muslims, he asks, yet no one takes up medicine, while jurists crowd into legal debate because medicine does not lead to posts over endowments and orphans' wealth.
The honest part. Al-Ghazali did advise keeping unprepared students away from the philosophers' books, and historians still debate how his criticism of Aristotelian causation shaped later philosophy. But a man who rebuked Muslims for leaving medicine to others was not trying to end science. As the next sections show, the observatories, star tables and hospitals of the following centuries were built by Muslims who knew his works well.
What actually went wrong
Political fragmentation. By the time the Crusaders arrived, the Muslim lands were divided between the Seljuk sultans and their princes, the Fatimids in Egypt and a crowd of smaller rulers (see the Seljuks and the end in 1258). Ibn al-Athir (died 630 AH / 1233 CE), looking back from the year 617 AH, listed three calamities of his age: the Tatars from the east, the Franks from the west, and the sword drawn among the Muslims who survived both.
The Crusades. Ibn al-Athir dates the Franks' rise to the fall of Toledo in 478 AH, then Sicily in 484, and then the march on Antioch in 490 to 491. His account of the siege of Antioch moves between rival Muslim lords who never acted as one. Two centuries of war on the Syrian coast drained money and attention from cities that had once paid for libraries. Athar tells this story in a divided world and the First Crusade.
The Mongols. Ibn al-Athir opens his account of 617 AH by saying he put off writing it for years: who could find it easy to write the obituary of Islam and the Muslims? Thirty-nine years later, in 656 AH / 1258 CE, Hulagu took Baghdad. Ibn Kathir (died 774 AH / 1373 CE) records that the caliph's army had been cut from nearly a hundred thousand in the last years of al-Mustansir to about ten thousand, many soldiers stripped of their land grants and begging in the markets. The city was sacked, al-Musta'sim was killed, and the Abbasid caliphate in Baghdad ended after more than five centuries. Ibn Kathir frames the disaster with a verse: "Indeed, God does not change the condition of a people until they change what is in themselves" (Quran 13:11; see the Surah al-Ra'd mind map). More on Athar: the Mongol era and the fall of Baghdad.
The Black Death. In 749 AH / 1348 CE the plague reached Damascus. Ibn Kathir, an eyewitness, writes that deaths passed a hundred and then two hundred a day, that the dead prayed over at the Umayyad Mosque reached about a hundred and fifty, and that around the city the toll was said to reach a thousand on many days. Cities lose scholars, craftsmen and patrons in a blow like that, and the plague returned again and again.
Shifts in trade. Golden age learning was paid for by trade, and much of the spice and cloth of India passed through Muslim ports. The Cairo chronicler Ibn Iyas records that in 912 AH (1506 to 1507 CE) Frankish ships, the Portuguese, were raiding Indian merchant shipping, more than twenty of them in the Hijaz sea, the Red Sea, until Indian cloth grew scarce in Egypt. In 915 AH word reached Cairo that the Mamluk fleet sent against them had been crushed. When that wealth moved to new sea routes, so did the money for libraries and observatories.
Science did not stop
The strongest answer to "al-Ghazali ended science" is what came after him.
- Maragha. In Jumada al-Ula 657 AH, a year after Baghdad fell, Nasir al-Din al-Tusi began an observatory at Maragha. Hajji Khalifa records that he gathered astronomers from Damascus, Mosul, Tiflis and Qazwin. Ibn Kathir, who distrusted al-Tusi's beliefs, still notes that he staffed it with philosophers, theologians, jurists, hadith scholars and physicians and filled it with books.
- Damascus. Ibn al-Shatir (born 704 AH, died 777 AH / 1375 CE) excelled in astronomy, as Ibn Hajar puts it, and built on the tradition traced in mathematicians, physicians and the science of light. Hajji Khalifa lists later astronomers, among them a timekeeper of a Cairo mosque, who abridged and corrected his star tables.
- Samarqand. In the ninth Islamic century Ulugh Beg, with Qadizada al-Rumi, Ghiyath al-Din Jamshid al-Kashi and Ali al-Qushji, carried out new observations. Hajji Khalifa calls the resulting tables "the best of the zijes and the closest to correctness."
- The Ottomans. A commentary on Ulugh Beg's tables was presented to the Ottoman sultan Bayezid II in 904 AH, and Hajji Khalifa, himself an Ottoman scholar, catalogued this whole tradition in Kashf al-Zunun (see the Ottomans).
So there was no sudden death. What happened was a slow loss of the wealth, peace and stable patronage that big science needs, while individual scholars kept going.
What this means for Muslims today
The decline was real, but blaming one scholar lets us off too lightly. The chroniclers point to division, weak defences and lost wealth, and al-Ghazali himself pointed to scholars who chased status and left useful knowledge to others. Both lessons still apply. For the wider picture of faith and the natural world, see Science in the Quran, the reading notes on Lost Islamic History, and Nawara's course on al-Ghazali's Ihya.