On Oct. 11, Pakistan marked the 15th anniversary of a military coup that ousted Sharif’s democratically elected government and brought Gen. Pervez Musharraf to power. Fast forward to 2014, Sharif is again leading a government that finds itself besieged amid nationwide resignation calls, led by Imran Khan and Dr. Tahirul Qadri.

Pakistan has been under military rule for over half of its existence, with the men in uniform stepping into the murky waters of politics during periods of political unrest. During the current political drama, Pakistan’s military leadership is watching the unfolding events silently from sidelines. This, however, does not signal that the civil-military ties are enjoying a smooth ride.

When Sharif came to power, he sought to tame the military leadership by superseding senior generals to appoint moderate Raheel Sharif as the army chief. With the military reluctant to embroil itself in any political controversy, the balance of power was expected to tip in favor of the civilian government that had won a clear majority in elections. However, the civil-military ties soon turned sour with the Sharif government trying to hold a treason trial of ex-President Musharraf. The trial irked the military leadership as it could taint the reputation of an almost sacred institution and end its culture of impunity.

Further, the government chose to pursue a futile dialogue process with the Taleban militants and despite cease-fire violations along the border, took steps toward reconciliation with India.

The political turmoil, deepened by lack of maturity shown by political leaders, has cornered Sharif and given the military an upper hand in Pakistan. The military has dismissed assertions that it covertly supported the protests to manipulate and weaken the civilian government. On the insistence of the government, Gen. Raheel Sharif met Khan and Qadri to find a political solution to the existing deadlock. Unlike many of his predecessors, Gen. Sharif has so far refrained from usurping power, but a “soft coup” may already have been staged.

The military is expected to eventually help negotiate a settlement between protesters and the government in return for concessions that will further strengthen its grip on matters of strategic interest.

In future, the military may dictate terms on policies regarding war against militants, and foreign relations with India, Afghanistan and the United States. By leading Pakistan’s policies on these key issues, the military will be effectively shaping the country’s future. With the exit of the US from neighboring Afghanistan, the military may seek to make inroads in the war-torn country and counter the insurgency threat emanating from its soil.

The military also remains deeply suspicious of India, which could halt progress on initiatives related to energy, trade and an easier visa regime. In perspective of the emerging geopolitical landscape, these policy matters will have severe repercussions for regional stability and growth prospects.

Even if the current political impasse is resolved, there is no doubt that the Sharif government will emerge as a much weakened force. The government needs to overcome this political challenge in a peaceful manner otherwise another era of martial law cannot be ruled out. Any such event will be unfortunate and deal a severe blow to the country’s nascent democratic process.