Pervez Musharraf's allies received a drubbing in Monday's elections. Now he faces the prospect of being impeached as president if his rivals can cobble together a two-thirds majority in parliament - Photograph: Aamir Qureshi/AFP
Visitors still call to see him at Army House, the marble-floored Rawalpindi residence of Pakistan's military chiefs, even though he retired three months ago. "It has been renamed Presidential Lodge," said spokesman Rashid Qureshi. "The normal routine is functioning."
But outside clouds are gathering. The spectacular rout of his Pakistan Muslim League (Q) party at the polls has shorn the retired commando of his political base, leaving him isolated and exposed.
"He's been sulking," said a senior party official. "He's retreated into a mental bunker, which is not healthy. He thinks everyone is out to get him and only listens to a small circle. It's a dangerous mindset to be in at this point in time. He could decide to hit back."
Musharraf's bad mood stems from the prospect of Nawaz Sharif, the rotund prime minister from Punjab he ousted in a 1999 coup and banished to Saudi Arabia a year later, returning to power. Sharif, who controls the second biggest party in parliament, the Pakistan Muslim League (N) has vowed to oust Musharraf at the earliest opportunity. "The nation has given its verdict. The sooner he accepts it the better," said Sharif.
But Musharraf, targeted at least twice by al-Qaida assassins, has a knack for survival. And he has at least one loyal friend left. Shortly after the electoral drubbing George Bush paused on a trip to Africa to pay warm tribute to him. He sounded less enthusiastic about Sharif's ascent. The message filtered quickly through the lines. In Washington the state department urged the opposition to work with Musharraf. In Islamabad American diplomats engaged in frantic talks with the opposition.
Senior officials from all parties told the Guardian they were trying to broker a deal that would ensure Musharraf stays in power. The PML (Q) official said his party was being pressured by US embassy officials hoping for a coalition between their party with Benazir Bhutto's Pakistan People's party, now led by her widower, Asif Ali Zardari.
"The Americans want a German-style grand coalition including the PPP," he said. "They want Musharraf to stick around, even if it's a diminished Musharraf."
British officials have been more coy, bristling at suggestions they are following the American lead. But many Pakistanis believe Whitehall is singing from a hymn sheet drawn up in the White House.
"The British are masters at using their language; the Americans are more crude. But in the end, it comes down to the same thing," said Nadir Chaudhri, a Sharif aide.
The western obsession with Musharraf seems puzzling. Since he resigned as army chief in late November most of Musharraf's power has drained to his successor, General Ashfaq Kayani. Diplomats unanimously praise the former spychief as a sober and sympathetic commander.
The problem is Sharif, who although not elected to parliament is still the power behind the PML (N). Although he went through a makeover during his exile in Jeddah and London - polishing his English, acquiring a hair transplant and a wardrobe of Saville Row tweed jackets - diplomats fear he cannot, or will not, deliver on their greatest concern: hunting al-Qaida and Taliban militancy.
Critics suspect Sharif of being a closet "fundo", or fundamentalist. They recall his infamous attempt to crown himself commander of the faithful while prime minister in 1998, and point to his family's conservative background. His close links with Saudi Arabia, which provided a royal jet and bulletproof Mercedes for his return from exile, have also caused some concern, particularly about possible leakage of nuclear technology.
But supporters and some political rivals say such fears are misplaced. A former Sharif minister said that during a 1998 meeting with Bill Clinton in the White House Sharif signed off on a secret plan to assassinate Osama bin Laden in Afghanistan, using a CIA-trained force of crack Pakistani troops. Earlier he permitted an FBI team to capture a terrorism suspect and bundle him into a plane bound for the US.
"The whole idea of Sharif being the odd man out in the war on terror is utter nonsense," said Chaudhri, his aide. "There's no one more committed to rooting out extremism than him."
Still, Bush, whose has given more than $10bn to Pakistan since 2001, is more at home with Musharraf.
"He's very loyal. It's almost a tribal thing," said one aide. To some degree, Musharraf has reciprocated. Yesterday the New York Times reported that the president has allowed the CIA to set up a secret base inside Pakistan from which unmanned Predator aircraft can attack al-Qaida fugitives in the tribal areas. If Musharraf goes, officials worry, so could the permission to strike at will.
But many Pakistanis are angry at what they see as American meddling, even among pro-western parties.
"The US has to understand that the parties now elected to parliament are not stooges of Musharraf. They are genuinely elected people," said Senator Enver Baig, of Bhutto's PPP.
On the streets there is a tangible sense that the boundaries of power are blurring and Musharraf's aura is fading. Sheikh Rashid Ahmed, a cigar-chomping politico who was a Musharraf favourite, was among 19 former ministers to lose their seats in Monday's election.
A few days later he held a press conference at a five-star hotel, visibly smarting from the loss and threatening to set up his own party.
"Politics is very crude. You have to deal with the situation," he told the Guardian.
Speculation is rife that other PML (Q) cronies will defect to Sharif's party - from whence many of them came - in droves.
On Thursday hundreds of lawyers and civil society activists tried to storm the barricades outside the Islamabad house of the imprisoned former chief justice, Iftikhar Muhammad Chaudhry. Lawyers in suits, ties and gardening gloves ripped back coils of barbed wire, only to be confronted with a phalanx of policemen armed with teargas and water canon. "Go Musharraf, go!" chanted the crowd - a mantra that has haunted the president since his botched attempted to fire Chaudhry last March. Musharraf despises the judge even more than he does Sharif; in a recent interview he described him as "the scum of the earth".
But unlike previous protests, the police did not baton charge or thrash the protesters - at least not very much - and only a few teargas canisters were fired, which landed half-heartedly in a nearby garden. When the crowd dispersed peacefully, one lawyer shook hands briefly with a policeman in riot gear, who smiled back.
"Things have changed," said the organiser, Athar Minallah. "Today Musharraf is obviously not in power, and that is the beauty of democracy."
But Musharraf's fate also rests on the ability of the fractious opposition to unite. In a country of giant egos and troubled history, that's no sure thing. A complex game of blackmail and manoeuvre is underway.
On Thursday afternoon government lawyers reinvigorated a corruption case against Zardari, a move seen as a shot over the bow in his government-forming talks with Sharif. But that night the two men appeared in public, looking chummy on a pair of gilt-edged thrones, announced they would "cooperate" to form a government against Musharraf.
Exactly what that means is unclear. Sharif's party wants to form a provincial government in Punjab but leave the national administration to the PPP, perhaps hoping to win an election outright in one or two years' time. Zardari wants a genuine coalition.
"We are still in the opening moves of this chess game," said Ayaz Amir, a newly-elected parliamentarian.
By roping in a few smaller parties the two leaders could cobble the two-thirds majority necessary to impeach Musharraf. The end could come by March 8, the date by which election officials estimate the new parliament will first sit.
Musharraf says he is going nowhere. "His term runs for five years. He knows there's a vast number of people who appreciate and love him for what he's done," said Qureshi, his spokesman. "After all he's done for this country, he would feel a little disappointed I guess."
In his self-vaunting autobiography, published last year, Musharraf wrote that "a true leader will always be loved by his people".
Supporters say if it comes to an impeachment motion, he may not fight to the end. "Frankly I'm not sure if he has the stomach for Custer's last stand. I don't see the fire in his belly any more," said a party official.
A new home, complete with security bunkers, is under construction on the edge of Islamabad. Whether he needs to move in there any time soon should become clearer in the coming weeks.