When America's world changed after 9/11, President Pervez Musharraf adapted faster than most. He severed Pakistan's official links with the Taliban, backed the US war on al-Qaida terror, and set about taming lawless tribal areas abutting the Afghan border. Gen Musharraf became George Bush's favourite Muslim.

But Washington memories are short and, five years on, the relationship grows rocky. The US has echoed Afghan claims that Pakistan lacks zeal in combating cross-border operations by "Talibanised" extremists in Waziristan and elsewhere. Officials mutter darkly about "inconsistent performance" and "poor execution" in catching al-Qaida renegades.

An unannounced US air strike inside Pakistan in January left Gen Musharraf looking weak (and 18 people dead). Differences have developed over neighbouring Iran's nuclear activities and a gas pipeline venture with Tehran. Heavy Chinese investment in Baluchistan's Gwadar port, on the Arabian Sea, also appears to have offended Washington's geo-strategic sensibilities.

Pakistani officials have, in turn, accused India and, by implication, the US, of stirring up Baluchi separatists. They complain Washington does not fully appreciate the risks Gen Musharraf is running and the army's losses in Waziristan. Speaking last week, the foreign secretary, Riaz Khan, said "changing the mindset" of extremists was a long-term task. "It doesn't help making Pakistan the whipping boy."

Mr Bush's recent drop-by visit to Islamabad, following his nuclear deal with arch-rival India, made matters worse. His clumsy call for free elections next year added insult to injury.

"Was there blowback after the Bush visit? Yes, no question," an informed western official said. But there was no rupture, he added. Washington's regional gameplan still centred on Gen Musharraf and no replacement was yet in sight. Pakistan's leader, lacking a strong political base and beset by intractable problems, needed US support at almost any price.

"From the Americans' perspective, this is a highly unstable country. The situation in Waziristan is tipping in favour of the Taliban. There's trouble in Baluchistan, in Kashmir, in Karachi. There's the religious parties ... Half the population of this country is virulently anti-American and it's growing," the official said. "And then there is Musharraf, sitting on top of this volcano. He's pretty indispensable. We're only a bullet away from significant instability. But I'm not sure we have anyone else."

Despite public US pressure for free elections, western diplomats in Islamabad predict wider US strategic and security considerations will privately trump concerns about Pakistan's dysfunctional democracy. "We're not abandoning the democratic agenda," a diplomat said. "But drugs, terrorism, instability, these are the issues that have a direct international impact." It would be left to Britain and the EU to worry about ballot-rigging.

Newspaper editor Najam Sethi said the US wanted a higher profile for mainstream political parties to offset religious groups - but suggested little would change at the top. "Despite his problems, and short of a bullet or a mysterious explosion, Musharraf will stay in power, continue to spend large amounts of money on the armed forces and continue to be bailed out by the international community," he said.

That meant internal strife could fester and spread, warned Samina Ahmed of the International Crisis Group. "Musharraf has no civilian constituency. If the elections were really free and fair, his position would disintegrate. But the west won't abandon him and so the problems deepen. They just don't trust the people."