Just when the Pakistan Prime Minister, Nawaz Sharif, was engaged in attempts to wrest control over the country's foreign and security policies from the army, he has been disqualified from holding office by the Supreme Court on corruption and money laundering charges ~ for which he is still to be tried.

The Pakistan army had been watching the PM's efforts to consolidate power with some consternation.

The army connived with the judiciary to ensure that it had two members (one each from military intelligence and the ISI) in the Joint Investigation Team appointed by the Supreme Court to inquire into the allegations against the PM and members of his family. Sharif's removal amounts to a soft coup and the army is the only gainer from his ouster in the PanamaGate scam.

Like Pakistan the nation, its army has been passing through turbulent times. Its counter-insurgency operations in KhyberPakhtoonkhwa (erstwhile North West Frontier Province) and the Federally Administered Tribal Areas (FATA) have not been going well; its establishments have been repeatedly attacked with at least some attackers coming from within; its relations with its NATO allies had plummeted to an all-time low after the spectacular US raid to kill Osama bin Laden at Abbottabad in May 2011 and never really recovered; the morale of the rank and file is low; and, its senior leadership is once again at loggerheads with the political leaders of Pakistan.

Despairing at the role played by the Pakistan army in meddling in the country's politics and governance in the context of the 'Memogate' scandal in December 2011, then Prime Minister Yousaf Raza Gilani had called the army a 'state within a state'.

Though this phrase has been in use for long, many analysts are of the view that the Prime Minister got it wrong because, in Pakistan, the army is the state. In fact, the army and the ISI (the Inter-Services Intelligence Directorate) together form the 'deep state'.

The military jackboot has ridden roughshod over Pakistan's polity for most of the country's history since its independence.

While Generals Ayub Khan, Yahya Khan, Zia-ul-Haq and Musharraf ruled directly as Presidents or Chief Martial Law Administrators, the other army chiefs achieved perfection in the fine art of backseat driving.

The army repeatedly took over the reins of administration under the guise of the 'doctrine of necessity' and, in complete disregard of international norms of jurisprudence, Pakistan's Supreme Court mostly played along.

Almost since the birth of Pakistan, the army has effectively ensured that the country's fledgling democracy is not allowed to take deep root. The roots of authoritarianism in Pakistan can be traced back to General (later Field Marshal) Ayub Khan who promoted the idea of 'guided' or 'controlled' democracy.

The concept of the 'Troika' emerged later as a power-sharing arrangement between the President, the Prime Minister and the Chief of the Army Staff (COAS).

The 'political militarism' of the Pakistan army imposed structural constraints on the institutionalisation of democratic norms in civil society. Some key national policies have always been dictated by the army. It determines Pakistan's national security threats and challenges and decides how to deal with them. Pakistan's policy on Afghanistan and Jammu and Kashmir is guided by the army and the rapprochement process with India cannot proceed without its concurrence.

The army controls Pakistan's nuclear weapons programme and the related research and development. The civilian government has no role to play in deciding the doctrine for nuclear deterrence, the force structures, the targeting policies and the process of command and control. The army Chief controls the ISI and decides the annual defence expenditure and all defence procurements. He also controls all senior-level promotions and appointments; the government merely rubber stamps the decisions.

In order to weaken India, as also to further China's objective to reduce India's influence in Asia, the Pakistan army has contrived a strategy to 'bleed India through a thousand cuts'. This has been given effect overtly through irregular warfare ~ the Razakar and Mujahid invasion of Kashmir in 1947-48 and Operation Gibraltar in 1965; and, the Kargil intrusions of 1999. Pakistan has been engaged in an asymmetric war with India through ISI-sponsored militancy and terrorism in Jammu and Kashmir and other parts of India, like the Mumbai terror strikes in November 2008.

In the 1980s, Pakistan had encouraged and supported Sikh terrorist organisations in their misplaced venture to seek the creation of an independent state of Khalistan.

The ISI provides operational, intelligence, communication, training, financial and material support to fundamentalist terrorist organisations like the Lashkar-e-Tayebba (LeT) and the Jaish-e-Mohammad (JeM) to wage war against India.

Similarly, it provides substantial intelligence and material support to various Taliban factions like the North Waziristan-based Haqqani network to operate in Afghanistan against the Karzai regime and against NATO-ISAF forces.

This is done despite the fact that Pakistan is a major nonNATO ally in the so-called 'global war against terrorism' (GWOT).

This duplicitous working ethos of running with the hare and hunting with the hound comes naturally to the Pakistan army and the ISI. External factors have also led to the army playing a larger role than is warranted in a democracy. By arming the military to the teeth, the US has driven Pakistan to become a praetorian state in which the army plays a dominant role.

It is only recently, in the face of the Pakistan army's perfidious role in Afghanistan that the US government has begun to come to terms with its ill-considered policy.

After the killing of 24 Pakistani soldiers by NATO-ISAF forces in a border outpost in November 2011, US-Pakistan relations had hit a new low. The incident led to the Pakistan government's decision to stop the flow of logistics convoys through Quetta and Peshawar, deny base facilities at Shamsi airbase and demand re-negotiation of the rules of engagement. In turn, the US government announced that it would withhold military aid to Pakistan. The precarious situation in Pakistan is headed towards a dangerous denouement.

Pakistan cannot survive as a coherent nation-state unless the army gives up its agenda of seeking strategic depth in Afghanistan, its attempts to destabilise India through its asymmetric war, and stops meddling in politics.

The army needs to confine its activities to improving the internal security environment by substantively enhancing its capacity to conduct effective counterinsurgency and counter-terrorism operations.

In the national interest, the Pakistan army must give up being a state within a state and accept civilian control, even if it does so with bad grace.

(The writer is Distinguished Fellow, Insti- tute for Defence Studies and Analyses (IDSA), New Delhi)