ISLAMABAD: Pakistan's prime minister, Nawaz Sharif, will name a new army chief this week who, if all goes well, could help the nuclear-armed nation shake off a legacy of coups and instability.
The stakes could not be higher.
The last time Sharif chose an army chief, he was toppled by the same general, Pervez Musharraf, a year later.
Musharraf held power for nearly a decade from 1999 until the restoration of civilian rule.
The United States, which views Pakistani cooperation as vital to its strategy in neighbouring Afghanistan, will be watching closely, hoping for continuity before most foreign troops pull out of Afghanistan next year.
"What is best for the country may not be the best political option," said Mahmud Durrani, a former general who served as Pakistan's national security adviser until 2008.
"Nawaz will try to appoint someone who will do his bidding, not someone who is good for the army. And similarly, the new chief will be driven by the institution and not necessarily by any civilian leader."
The post of army chief is one of the most powerful in Pakistan and anxiety rests on who will replace the taciturn, chain-smoking General Ashfaq Kayani, who steps down on Friday after six years at the helm.
Three senior generals, Lieutenant-General Haroon Aslam, Lieutenant-General Tariq Khan and Lieutenant-General Rashad Mahmood, are seen as main contenders.
Mahmood is the third most senior commander and, army insiders say, a Kayani favourite.
Khan commands a Pakistani army corps and is considered an important interlocutor with the United States. Aslam is the most senior military officer after Kayani, and thus his natural heir.
Kayani has won credit for reducing the military's public role in politics although the army retains huge influence behind the scenes, especially over security and foreign policy. Like every civilian leader, Sharif will be keen to limit that sway under a new commander.
"Nawaz may trust in Kayani's democratic credentials, but he knows that is no guarantee that the next guy will also stay in the barracks," said a senior official in Sharif's administration who declined to be named.
"He also knows full well that most senior army officers are not supporters of Kayani's softer approach. This is an uneasy moment for Nawaz."
The army has ruled Pakistan for more than half its 66-year history.
One of Sharif's pledges in the run-up to his May election victory was to improve ties with old rival India.
Clashes between the two armies in the disputed Kashmir region just weeks after the vote put paid to that, for the time being at least, and Sharif will need to gain the support of Kayani's successor to make any progress on that front.
At home, the army has been wary of another Sharif campaign promise to open talks with Pakistani Taliban militants, battling the state since 2007 to impose their vision of a Shariah rule.
On the broader, decades-old issue of Pakistan's army using militant groups to further objectives in Afghanistan and in confronting India, Western officials believe that under Kayani the army's attitudes have been changing, largely because of the rise of the Pakistani Taliban.
Western officials believe that Kayani has been instrumental in pushing for negotiated settlements with insurgents on both sides of the Afghan-Pakistani border. They'll be hoping that trend continues under his successor.
"Sharif can't afford to pick a wild card right now," a retired Pakistani general told Reuters.
"He knows full well that this is not a time for adventurism or any wild experiments."