D OZENS OF BOYS sit in rows on the carpet, hunched over open books, reciting a passage over and over. As skullcaps bob rhythmically, childish voices evoke the cacophony of an aviary. Reading and reciting the Koran are all this school teaches, and may be all the education these boys get.

During last year’s election campaign, Imran Khan, a former cricket star who is now prime minister, promised a naya or “new” Pakistan. The scene at this madrasa, perched on a pine-forested ridge 100km north of Islamabad, the capital, provides a hint of how tenacious the old Pakistan remains. There are more than 30,000 madrasas like this one, with perhaps 2.5m pupils enrolled. Many of the students are boarders whose poor, illiterate parents give them up for long periods to the religious charities that run such schools. They graduate with strong opinions, but few skills.

That will all change, says Mr Khan’s team. Soon, insists his minister of education, the religious schools will have to teach a broader range of subjects to gain government accreditation. Eventually, a single national curriculum will be imposed. The army, which is widely seen as the power behind the throne and has often appeared indulgent to religious extremism, supports education reform. Its own growing network of fee-paying schools is heavy on sciences and English.

As for madrasa graduates who turn to jihadist militancy, a senior commander is adamant. The time when Pakistan’s “deep state” winked at favoured jihadist groups is over. “We will not allow these goons to run around and dictate our foreign policy,” he insists. Mr Khan is equally emphatic. What use does Pakistani intelligence have for such groups anymore, he asks. They were created to fight the Soviets in Afghanistan, and then lingered in the 1990s when they were encouraged to make life difficult for India in its part of Kashmir, which Pakistan claims. But from now on there will be no Kashmir exception, says Mr Khan, hinting that it may become harder for Pakistan-based militants to infiltrate Indian territory. “What we found is that Kashmiris are the ones who suffer,” he says, alluding to harsh measures India has often taken to maintain security on its side of the border.

Pakistani politicians and soldiers have made such pledges before. India tends to dismiss them as insincere attempts to escape international condemnation after terrorist groups based in Pakistan mount attacks in India—as in February, when an outfit called Jaish-e-Muhammad killed 40 policemen in India’s bit of Kashmir. India responded by sending jets to drop bombs deep inside Pakistani territory. Their target was the madrasa, which Indian officials said was a training centre for terrorists.

Pakistan retaliated largely symbolically, bombing only open spaces, and also defused tensions by quickly releasing a captured Indian pilot. Whether this emollient approach will last is unclear. But Pakistan’s army seems desperate to put its best foot forward, claiming that a new era of civil-military relations has dawned. Mr Khan declares that he enjoys total support, even as top generals straight-facedly refer to the prime minister as “boss” and profess their love of democracy and the rule of law.

Mr Khan, although undoubtedly not in charge of the generals, has won plaudits for trying to honour his loudest election promise, which was to crack down on corruption. Since he came into office last August the National Accountability Bureau, aptly known as NAB , has mounted a fierce offensive against allegedly crooked officials. No fewer than five former prime ministers are under investigation. The current heads of the two main political parties that challenge Mr Khan’s Pakistan Tehreek-e-Insaf ( PTI ), as well as close relatives, are also being questioned.

Yet the offensive has been so vigorous that some fear it has put a chill on investment, at a time Pakistan desperately needs it. It is also clear that, fairly or not, the biggest targets of the campaign happen to be Mr Khan’s political opponents. Similarly, the government has justified sudden, drastic cuts in spending on advertising as a needed economy. But given that such spending represented a big slice of revenue for many media firms, the move, which has cost as many as 3,000 jobs, appears to have disproportionately hurt outlets that have been unkind to Mr Khan. The army, despite its professed commitment to democracy, quells criticism in even more radical ways, ordering irksome channels off the air and abducting nettlesome bloggers.

Whether the media can air it or not, there will be more resentment when the government takes painful steps needed to mend the economy. The IMF , which looks set to impose tough conditions for a bailout—Pakistan’s 13th in 31 years—recently predicted that, without reforms, the economy will grow by just 2.5% a year over the next five years, barely outpacing the growth of the population. The rupee has lost more than 30% of its value since Mr Khan took office, inflation has soared and both the current-account and budget deficits are unsustainable. The prime minister puts on a brave face, noting that things were worse a few months ago, when foreign-exchange reserves were only enough to pay for two weeks of imports.

The improvement, alas, is solely owing to charity from China and the Gulf. The unkind may conclude that the kinder, gentler image Pakistan is trying to project is prompted by a sobering look at its finances. Pakistani officials clearly relished inviting diplomats and journalists to the hilltop madrasa that India claimed to have blitzed, to show that it remains intact. But India routinely humiliates Pakistan in a much more profound way: its economy is growing so fast that it expands by the size of Pakistan’s every two years.