In the autumn of 1997, the corpses of his soldiers still strewn on the Kargil heights, prime minister Nawaz Sharif swore-in Lieutenant-General Khwaja Ziauddin as his new army chief, sacking the man who had led his country into a disastrous war. There was, however, just one hitch: Nobody had a brass star to pin on General Ziauddin's shoulder, to add to the three already there. Brigadier Javed Malik, witnesses have since recalled, gallantly tore one off from his own uniform, and handed it over.
There was another hitch, less easily solved: General Pervez Musharraf, the man Sharif sacked that October, flew back home and sent the prime minister to prison. The Pakistan Army would not countenance a civilian deciding its fate.
Now, as prime minister-elect Imran Khan promises to invent a 'Naya Pakistan', it's important to reflect on the lessons of that episode. In key senses, Imran's rise portends nothing: He may become prime minister, but he won't be running Pakistan. True power " elections and democratic transitions notwithstanding " continues to lie with the Generals.
Historian APJ Taylor, reflecting on the revolutions of 1848-1849, famously observed that "German history reached its turning point but failed to turn". The country marched on, inexorably, towards its near-annihilation in the Second World War.
There is no country that has had more new dawns than Pakistan " Imran Khan's 'Naya Pakistan' being just its latest iteration. Like imperial Germany, though, it has stayed firmly stuck at each turning point. Imran Khan, without doubt, knows that he does not actually rule the country he has been sworn-in to lead today.
Imran Khan's rise began, in some senses, in 2010, when President Asif Ali Zardari put his signature on the 18th Amendment to the Pakistani Constitution, stripping the president of his right to dissolve Parliament. The military ruler General Muhammad Zia-ul-Haq had given that power to the President of Pakistan through the 8th Amendment, empowering himself to summarily dismiss the elected politicians he used to legitimise his rule.
Nawaz Sharif did away with this constitutional provision, only to have Musharraf restore it. Zardari's amendment attacked military primacy in Pakistan's political life: The courts could no longer endorse the suspension of the Constitution, the power to appointment of judges was given to a commission; the president could no longer declare an Emergency in any province unilaterally.
The Zardari government incensed the Generals early on, by seeking to push strategic policy in a new direction. The new president promised to bring perpetrators of the 26/11 terror attacks to trial, to end terrorism directed at India, and pursue peace in Kashmir. Zardari also let it be known he wanted civilian control over the Inter-Services Intelligence (ISI) Directorate, an agency that not only waged proxy wars across Pakistan's borders, but worked actively to subvert its politics.
From 2010 on, Pakistan Army chief Pervez Ashfaq Kayani set about restoring the order that had come about in the wake of Zia-ul-Haq's assassination, a system the scholar and diplomat Hussain Haqqani has described as "military rule by other means".
The scholar Hassan Askari Rizvi noted that the army chief was the "pivot" for this political system. In turn, Rizvi has noted, the army chief derived authority from the corps commanders who addressed "not only security, professional and organisational matters, but also deliberate on domestic issues".
In May 2010, Pakistan's defence minister Chaudhry Ahmed Mukhtar said the government was "neither granting extension to chief of army staff, nor had the general sought it". But just a week later, media reported that a conference of the Corps Commanders had called for an extension, and that is just what happened.
Kayani repulsed Zardari's early efforts to bring the ISI under civilian control, and defeated his efforts to seek a grand rapprochement with India. "India," Asif Ali Zardari famously said in an October 2008 interview, "Has never been a threat to Pakistan."
Less than two years later, in February 2010, General Kayani publicly asserted that the Pakistan Army was an "India-centric institution", adding that this "reality will not change in any significant way until the Kashmir issue and water disputes are resolved".
In February 2011, following the US military's raid that claimed the life of Osama bin Laden, the army became increasingly fearful that Zardari might use the opportunity to regain control. It engineered a campaign against his key aides, notably then-ambassador to Washington, Husain Haqqani, alleging the government was engaged in treason.
Zardari chose not to push tensions to boiling point, and backed down on his reform plans. In time, he quietly ceded power to prime minister Nawaz Sharif.
Like his predecessor, Sharif too came to power determined to mend ties with India. In an interview to CNN-IBN, after he took office in 2013, the new prime minister promised everything Indians hoped for"and then some. He vowed to "make sure that the Pakistani soil is not used for any such (terrorist) designs against India", said he would examine allegations of ISI involvement in 26/11, and promised full disclosure on Kargil.
To his credit, Sharif did try to deliver: Jihadist attacks on Indian forces in Kashmir declined in 2014 and 2015; terrorist groups like the Indian Mujahideen were reined-in; he candidly blamed the Jaish-e-Muhammad for Pathankot, and promised action.
In the end, though, the script played out just as it had after 2010. General Qamar Javed Bajwa, hand-picked by the prime minister, proved loyal to the interests of his institution. Pressured by the Corps Commanders, Bajwa ensured anti-India terrorist groups were able to continue operations in Kashmir and across the rest of India. Following Pathankot, the ISI ensured perpetrators identified by India were not arrested.
The Generals also backed a series of political challenges to Nawaz Sharif's authority, culminating in an election characterised by less-than-subtle military-backed action against other parties, and contentious legal action against Sharif himself. The election has made clear the Generals hold the ultimate key to power, not voters.
Even though prime minister-elect Imran Khan isn't known to spend his time reflecting on history, he'll know leaders who take on the army don't do well. In 1990, Sharif came to power on the shoulders of General Muhammad Zia-ul-Haq, promising to build an Islamic State. In 1993, though, the President of Pakistan appointed General Wahid Kakkar as army chief, superceding Lieuten ants-General Rehm-Dil Bhatti, Mohammad Ashraf, Farrakh Khan and Arif Bangash. Sharif pushed back, and was forced out of office.
In 1998, Sharif sacked the soft-spoken General Jehangir Karamat for demanding the creation of a National Security Council to adjudicate on civil-military relations. He hand-picked General Musharraf " now superceding Lieutenant General Ali Kuli Khan and Lieutenant General Khalid Nawaz Khan " only for this to end in catastrophe, after the Kargil war.
Popular consensus has it that the Pakistan Army is a battleground between Islamists and pro-western professionals. In fact, as scholars like Ayesha Siddiqa have shown us, the military is an independent political actor, representing a set of concrete interests: The military is, after all, Pakistan's largest owner of land and custodian of an industrial empire that runs everything from breakfast-cereal plants to banks.
The army is not just the custodian of the ideological and territorial boundaries of the State; it is, in key senses, the State itself.