Ehsan Masood explores the status of science in the Islamic world today for a new series on BBC Radio 4. He asks whether measures taken to promote science in recent years are having an impact.
In the mid 1990s, I was asked by the science journal Nature to discover the state of science in Pakistan.
There are real signs of improvement on science in Islamic countries
Like today, Pakistan had become a democracy after more than a decade of military rule. Benazir Bhutto was prime minister. But science then was not a priority.
The ministry had no minister and - the nuclear programme aside - the national research budget was less than that of an average UK university.
I'd find senior professors sitting behind massive desks in crumbling buildings, with little to do but swat flies and complain how bad everything was.
In subsequent years, I've had the dubious honour of witnessing similar scenes in country after country.
Scientific research and science spending in today's Muslim nations is on a par with the poorest developing countries - even if you include the wealthy oil-producing states.
Take just one statistic and the extent of the problem becomes clear: between 1996 and 2005, scientists from Turkey, among the Islamic world's most productive nations, published 88,000 research papers.
That's less than what a single university in America's Ivy League would publish in the same period.
Muslim countries spend on average 0.38% of their national wealth on science. The average for a developing country is 0.73%.
But now there are real signs of improvement. Iran has always been at the forefront of getting young people to stay in education longer and there are now 10-times as many young people in universities compared with 1979.
Pakistan has seen a more modest doubling of young people in higher education in the past decade.
Turkey, meanwhile, has doubled its research spending in the past five years, and has a target to spend 2% of its national income on science by next year. And Qatar has set a target to reach the developed-world average of 2.8% by the same deadline.
Why is all this happening now? There are many reasons, but two stand out: One is a sense of embarrassment at constantly being reminded that you're at the bottom of the pile.
Second is what the economist Jeffrey Sachs famously called "the resource curse". This is the view that countries which rely on their natural resources for income and growth are not going to prosper in the long term.
Now that change is afoot, scientists and policymakers will need to face up to some important challenges.
Some, such as low investment, weak education systems, poor infrastructure and authoritarian ruling systems, can be found in many developing nations.
Others are more specific to the Islamic world. One of these is creationism; a second is the view that the Qur'an can be seen as a source of scientific knowledge.
Islam's sacred text contains several passages that describe things like the origin of life and the birth of the Universe. Some believers therefore also see the book as a scientific text.
Both the teachers of science and many leaders of religion see this as a worrying development.
On the one hand, the religious leaders don't like the idea that religion should be subordinate to science; and on the other, the scientists are concerned that the next generation of scientists is being given a misleading impression of the scientific method.
The irony in all this is that from 700 to 1500, scientists from the Islamic world didn't need to look into the Qur'an as a source of scientific knowledge: they were too busy researching, questioning, discovering and innovating.
Old ideas were discarded if new evidence said they might be wrong, such as the idea that the world is flat; or that the Earth is not at the centre of the Universe.
The Islamic world is on a bold new path to knowledge and development. And many scientists often talk about rediscovering a lost heritage, or restoring the golden age of learning.
If there's one single lesson from the past we can all learn, it is this: new knowledge needs a willingness to question received ideas - not to be disrespectful, but to ask questions, to think and to debate.
Many in the Islamic world's new generation of scientists understand this well. A sustained revival in learning and science will need many more to do so.
Ehsan Masood is a senior editor at Nature and the author of Science and Islam: A History. He presents Islam and Science on BBC Radio 4 at 2100 GMT on Monday, 16 February. If you miss it, catch it later later on the BBC iPlayer