Military strongmen have ruled Pakistan for longer than elected politicians — and, paradoxically, have treated that nation's scientists far better than the much less stable civilian administrations.

General Pervez Musharraf, whose nine-year rule ended with his resignation on 18 August, was a prime example: his regime greatly strengthened the foundations for a Pakistani knowledge economy, instituting reforms that included bigger research budgets, an ambitious university-building programme, a nationwide digital library, a scheme to attract international faculty, and performance-related pay for professors. Many of the changes have been praised in external evaluations within the past year, including those of the World Bank, the US Agency for International Development and the British Council.

But a week after Musharraf was forced to go, the governing coalition of political parties that replaced him has collapsed. Worryingly, Pakistan's governance of its science seems all set to revert to the situation that prevailed under previous elected governments, when the science and education ministries were often afterthoughts — and, in the case of science, with laughable budgets, no ministers and no leadership.

Is history repeating itself? Pakistan has lacked both a science and an education minister for several months, important projects are on hold and budgets have been cut. Only one out of nine planned new universities with international partners is to go ahead on schedule and, in spite of earlier promises to the contrary, the higher-education budget for the fiscal year 2007–08 has been cut from US$438 million to US$364 million. Vice-chancellors at 12 universities have had to take out bank loans to pay salaries.

The future of Atta-ur-Rahman, the former president's long-serving science adviser, is also uncertain. Atta-ur-Rahman, a professor of natural product chemistry at the University of Karachi, was the chief architect of reforms under Musharraf, who once boasted that he had so much confidence in his adviser that Atta-ur-Rahman's ideas would be funded “without reservation”.

But amid the turmoil, there are reasons for optimism. Nina Fedoroff, science adviser to US Secretary of State Condoleezza Rice, was in Islamabad earlier this week for talks on ramping up US assistance to Pakistan's science programmes. The United States and Pakistan together contribute $150 million to what is the world's largest Fulbright programme of fellowships, enabling Pakistani students to go to the United States for postgraduate study and research. In addition, Pakistan is slated to receive a further $7.5 billion in US aid over the next five years and Pakistani officials would like 20% of this earmarked for science and innovation.

Another reason to be optimistic is that this round of non-military government could be stabler and stronger than previous ones. The incoming government will be dominated by the Pakistan Peoples Party, led by Asif Ali Zardari, the widower of the murdered ex-Prime Minister Benazir Bhutto. Should Zardari become the new president, this will bring a measure of stability and an opportunity for real change. Previous elected governments dropped the ball on science and education because they were weak and spent a lot of effort — unsuccessfully — keeping the generals at bay. Zardari's party has a majority in parliament and Pakistan's military is so far showing little interest in returning to politics.

But the Peoples Party has some learning to do. Its previous record on science is among the most misguided of all Pakistan's elected governments, and Zardari himself has served time in prison on corruption charges — which he denies. In the late 1970s, the party's founder Zulfikar Ali Bhutto diverted scarce resources and personnel into building the nuclear bomb. His daughter Benazir's contribution during the 1980s and 1990s was a science ministry without a dedicated minister.

A return to the pre-Musharraf era would send Pakistan back to the scientific stone age. The new government needs to recognize that regardless of how much it disliked him, the general bequeathed it a foundation in science and technology on which it can build.