THE sleep has been long and deep. In 2005 Harvard University produced more scientific papers than 17 Arabic-speaking countries combined. The world’s 1.6 billion Muslims have produced only two Nobel laureates in chemistry and physics. Both moved to the West: the only living one, the chemist Ahmed Hassan Zewail, is at the California Institute of Technology. By contrast Jews, outnumbered 100 to one by Muslims, have won 79. The 57 countries in the Organisation of the Islamic Conference spend a puny 0.81% of GDP on research and development, about a third of the world average. America, which has the world’s biggest science budget, spends 2.9%; Israel lavishes 4.4%.

Many blame Islam’s supposed innate hostility to science. Some universities seem keener on prayer than study. Quaid-i-Azam University in Islamabad, for example, has three mosques on campus, with a fourth planned, but no bookshop. Rote learning rather than critical thinking is the hallmark of higher education in many countries. The Saudi government supports books for Islamic schools such as “The Unchallengeable Miracles of the Qur’an: The Facts That Can’t Be Denied By Science” suggesting an inherent conflict between belief and reason.

Many universities are timid about courses that touch even tangentially on politics or look at religion from a non-devotional standpoint. Pervez Hoodbhoy, a renowned Pakistani nuclear scientist, introduced a course on science and world affairs, including Islam’s relationship with science, at the Lahore University of Management Sciences, one of the country’s most progressive universities. Students were keen, but Mr Hoodbhoy’s contract was not renewed when it ran out in December; for no proper reason, he says. (The university insists that the decision had nothing to do with the course content.)

But look more closely and two things are clear. A Muslim scientific awakening is under way. And the roots of scientific backwardness lie not with religious leaders, but with secular rulers, who are as stingy with cash as they are lavish with controls over independent thought.

The long view

The caricature of Islam’s endemic backwardness is easily dispelled. Between the eighth and the 13th centuries, while Europe stumbled through the dark ages, science thrived in Muslim lands. The Abbasid caliphs showered money on learning. The 11th century “Canon of Medicine” by Avicenna (pictured, with modern equipment he would have relished) was a standard medical text in Europe for hundreds of years. In the ninth century Muhammad al-Khwarizmi laid down the principles of algebra, a word derived from the name of his book, “Kitab al-Jabr”. Al-Hasan Ibn al-Haytham transformed the study of light and optics. Abu Raihan al-Biruni, a Persian, calculated the earth’s circumference to within 1%. And Muslim scholars did much to preserve the intellectual heritage of ancient Greece; centuries later it helped spark Europe’s scientific revolution.

Not only were science and Islam compatible, but religion could even spur scientific innovation. Accurately calculating the beginning of Ramadan (determined by the sighting of the new moon) motivated astronomers. The Hadith (the sayings of Muhammad) exhort believers to seek knowledge, “even as far as China”.

These scholars’ achievements are increasingly celebrated. Tens of thousands flocked to “1001 Inventions”, a touring exhibition about the golden age of Islamic science, in the Qatari capital, Doha, in the autumn. More importantly, however, rulers are realising the economic value of scientific research and have started to splurge accordingly. Saudi Arabia’s King Abdullah University of Science and Technology, which opened in 2009, has a $20 billion endowment that even rich American universities would envy.

Foreigners are already on their way there. Jean Fréchet, who heads research, is a French chemist tipped to win a Nobel prize. The Saudi newcomer boasts research collaborations with the universities of Oxford and Cambridge, and with Imperial College, London. The rulers of neighbouring Qatar are bumping up research spending from 0.8% to a planned 2.8% of GDP: depending on growth, that could reach $5 billion a year. Research spending in Turkey increased by over 10% each year between 2005 and 2010, by which year its cash outlays were twice Norway’s.

The tide of money is bearing a fleet of results. In the 2000 to 2009 period Turkey’s output of scientific papers rose from barely 5,000 to 22,000; with less cash, Iran’s went up 1,300, to nearly 15,000. Quantity does not imply quality, but the papers are getting better, too. Scientific journals, and not just the few based in the Islamic world, are citing these papers more frequently. A study in 2011 by Thomson Reuters, an information firm, shows that in the early 1990s other publishers cited scientific papers from Egypt, Iran, Jordan, Saudi Arabia and Turkey (the most prolific Muslim countries) four times less often than the global average. By 2009 it was only half as often. In the category of best-regarded mathematics papers, Iran now performs well above average, with 1.7% of its papers among the most-cited 1%, with Egypt and Saudi Arabia also doing well. Turkey scores highly on engineering.

Science and technology-related subjects, with their clear practical benefits, do best. Engineering dominates, with agricultural sciences not far behind. Medicine and chemistry are also popular. Value for money matters. Fazeel Mehmood Khan, who recently returned to Pakistan after doing a PhD in Germany on astrophysics and now works at the Government College University in Lahore, was told by his university’s vice-chancellor to stop chasing wild ideas (black holes, in his case) and do something useful.

Science is even crossing the region’s deepest divide. In 2000 SESAME, an international physics laboratory with the Middle East’s first particle accelerator, was set up in Jordan. It is modelled on CERN, Europe’s particle-physics laboratory, which was created to bring together scientists from wartime foes. At SESAME Israeli boffins work with colleagues from places such as Iran and the Palestinian territories.

By the book

Science of the kind practised at SESAME throws up few challenges to Muslim doctrine (and in many cases is so abstruse that religious censors would struggle to understand it). But biology—especially with an evolutionary angle—is different. Many Muslims are troubled by the notion that humans share a common ancestor with apes. Research published in 2008 by Salman Hameed of Hampshire College in Massachusetts, a Pakistani astronomer who now studies Muslim attitudes to science, found that fewer than 20% in Indonesia, Malaysia or Pakistan believed in Darwin’s theories. In Egypt it was just 8%.

Yasir Qadhi, an American chemical engineer turned cleric (who has studied in both the United States and Saudi Arabia), wrestled with this issue at a London conference on Islam and evolution this month. He had no objection to applying evolutionary theory to other lifeforms. But he insisted that Adam and Eve did not have parents and did not evolve from other species. Any alternative argument is “scripturally indefensible,” he said. Some, especially in the diaspora, conflate human evolution with atheism: rejecting it becomes a defining part of being a Muslim. (Some Christians take a similar approach to the Bible.)

Though such disbelief may be couched in religious terms, culture and politics play a bigger role, says Mr Hameed. Poor school education in many countries leaves minds open to misapprehension. A growing Islamic creationist movement is at work too. A controversial Turkish preacher who goes by the name of Harun Yahya is in the forefront. His website spews pamphlets and books decrying Darwin. Unlike his American counterparts, however, he concedes that the universe is billions of years old (not 6,000 years).

But the barrier is not insuperable. Plenty of Muslim biologists have managed to reconcile their faith and their work. Fatimah Jackson, a biological anthropologist who converted to Islam, quotes Theodosius Dobzhansky, one of the founders of genetics, saying that “nothing in biology makes sense except in the light of evolution”. Science describes how things change; Islam, in a larger sense, explains why, she says.

Others take a similar line. “The Koran is not a science textbook,” says Rana Dajani, a Jordanian molecular biologist. “It provides people with guidelines as to how they should live their lives.” Interpretations of it, she argues, can evolve with new scientific discoveries. Koranic verses about the creation of man, for example, can now be read as providing support for evolution.

Other parts of the life sciences, often tricky for Christians, have proved unproblematic for Muslims. In America researchers wanting to use embryonic stem cells (which, as their name suggests, must be taken from human embryos, usually spares left over from fertility treatments) have had to battle pro-life Christian conservatives and a federal ban on funding for their field. But according to Islam, the soul does not enter the fetus until between 40 and 120 days after conception—so scientists at the Royan Institute in Iran are able to carry out stem-cell research without attracting censure.

But the kind of freedom that science demands is still rare in the Muslim world. With the rise of political Islam, including dogmatic Salafists who espouse a radical version of Islam, in such important countries as Egypt, some fear that it could be eroded further still. Others, however, remain hopeful. Muhammad Morsi, Egypt’s president, is a former professor of engineering at Zagazig University, near Cairo. He has a PhD in materials science from the University of Southern California (his dissertation was entitled “High-Temperature Electrical Conductivity and Defect Structure of Donor-Doped Al2O{-3}”). He has promised that his government will spend more on research.

Released from the restrictive control of the former regimes, scientists in Arab countries see a chance for progress. Scientists in Tunisia say they are already seeing promising reforms in the way university posts are filled. People are being elected, rather than appointed by the regime. The political storms shaking the Middle East could promote not only democracy, but revive scientific freethinking, too.