Stories about people who prevail against the odds are always heart-warming, and the tale in this issue of Nature about a group of Iranian neuroscientists (see page 264) is no exception. Such successes have been rare in Iran's recent history. Over the past few years, however, the country has been investing more public money in science, and nurturing the gradual emergence of a climate in which high-quality research can flourish.

During this period, social and political constraints on Iranian life have visibly relaxed. Headscarves on the streets of Tehran are now sometimes perched so far back that Velcro is needed to stop them falling off altogether. Science has also benefited from this relaxation.

Even Ayatollah Ali Khamenei, the senior cleric effectively in charge of the country, has been speaking up for science, calling on his country to develop “self-confidence in all scientific fields”. The call resonates within a small academic community that is keenly aware of Iran's rich and ancient heritage of scientific achievement.

The government, led by the elected president, Mohammad Khatami, has meanwhile increased science funding. It has also introduced reforms — approved this year, after a tough fight — that give universities and research institutes much more autonomy. In February, academics' salaries were sharply increased: as a result, many of them will be able to make ends meet without a second job, for the first time since the Islamic revolution in 1979.

Some of the most productive laboratories, such as the Institute for Studies in Theoretical Physics and Mathematics (IPM) in Tehran and the Institute for Advanced Studies in Basic Sciences (IASBS) in Zanjan, have taken the opportunity presented by the reform package to reorganize themselves. The IPM says it is basing its new structure on that of the Max Planck Society in Germany, in which the research directors of individual labs have full control over budgets and research agendas.

The publication rate of Iranian scientists in international journals, meanwhile, has quadrupled over the past decade. Although still relatively low, the average impact factor of Iranian papers has also risen. But much of the improvement can be traced back to a small number of researchers. The number of papers per researcher at the IASBS, for example, is nearly twice that of its closest competitor, the Sharif University of Technology in Tehran. The reforms set out to extend the base of scientific excellence in Iran.

That may prove difficult to accomplish, given the current isolation of Iranian scientists from their peers abroad. US economic sanctions make it difficult for them to travel to meetings in the United States. And because most scientific equipment contains US components that are covered by sanctions, Iranians can only procure it through middle-men who disguise the equipment's ultimate destination but inflate its price and leave recipients with no quality guarantees or maintenance arrangements. Scientists in Iran tell stories of waiting up to two years for an order, only to receive shipment of the wrong model.

Unfortunately, given current tensions over Iran's nuclear programme (see Nature 435, 132; 2005 ), the sanctions are unlikely to be lifted in the short term. Instead, the situation could rapidly deteriorate. Internal support for scientific development and for the free exchange of ideas is far from assured.

The president will be replaced after elections due on 17 June. One candidate for the presidency is immunologist Mostafa Moin, a former research minister who resigned from the government in 2003 in protest at parliamentary opposition to the university reform act. Moin could be relied on to continue along the reformist path set by Khatami. It is just as likely, however, that the elections will yield instead a president less interested in either reform or scientific freedom.

The Iranian scientists who have put together strong research groups have done so by carefully steering clear of politics. But they are admirably determined to help build up a research infrastructure in the country that will outlast their own careers. Scientists everywhere should avail themselves of every opportunity to assist these grassroots efforts.