Islamabad: It is becoming increasingly clear that Pakistan, which is caught between a Afghan President Ashraf Ghani's government and its rising mujahidin allies and the Taliban, won't get what it wants after US troops withdrawal from Afghanistan.

According to an article in the Asia Times, Pakistan is now caught in the middle of a struggle for power that threatens to explode into a new destabilizing phase of civil war.

At the same time, anti-Pakistan terrorist and jihadi groups aligned in varying degrees to the Taliban on both sides of the border are angling to carry out new lethal attacks inside Pakistan, a drive that could intensify if Islamabad allows the US new access to its military bases, writes Salman Rafi Sheikh in the Asia Times.

According to a recent UN report, at least a dozen different militant groups are now active in both Pakistan and Afghanistan, with at least 6,500 Pakistani nationals reportedly involved.

According to the report, Pakistan-based jihadi groups such as Jaish-i-Mohammed (JeM) and Lashkar-e-Tayyiba (LeT) continue to fight alongside Taliban groups against Afghan national forces.

"If and when Afghanistan's conflict intensifies, Pakistan will inevitably be drawn more deeply into the fight," says Sheikh.

Islamabad's response so far has been to literally fence itself off against the rising threats that exist on both sides of the border.

While fencing stretches of the 2,670-kilometer border may curb cross-border infiltration to a degree, the multi-billion-dollar policy will ultimately have a limited impact on preventing groups from launching attacks in Afghanistan and fleeing back to sanctuary in Pakistan, reported Asia Times.

With anti-Pakistan Taliban-aligned groups already active in Pakistan's Baluchistan province, the escalating situation presents a huge dilemma for Pakistani policymakers who had earlier hoped to shape Afghanistan into a satellite state that it controls to its advantage vis-à-vis rival India.

While Pakistan has historically followed a "strategic depth" policy towards Afghanistan, whereby it attempts to control the country as a political pawn and strategic hedge vis-à-vis India, a role the Taliban served in the 1990s, in the present context Islamabad can't readily revert to the doctrine as Taliban-influenced groups are pitted against the Pakistan state, writes Sheikh.

Indeed, the Taliban's drive to re-establish an "Islamic Emirate" in Kabul will provide new ideological fire for the thousands of Islamic militants in border regions to pursue similar objectives in Pakistan.

Afghanistan could thus quickly morph into a proxy theatre for India-Pakistan rivalry after US and NATO troops fully withdraw by September 11 this year.

At the same time, Pakistan cannot afford to completely antagonise the Afghan Taliban, which is closing in on a total victory as US troops retreat and withdraw. Any move that alienates the group, including revived ties with US forces, could push Pakistan-based Taliban groups to resume extreme terrorist action against Pakistan state targets and forces, opines Sheikh.

Pakistan is clearly struggling to strike a balance between Ghani's government and the Taliban that prevents new waves of terrorism inside its borders while also keeping Afghanistan as an ally that does not move too close to India in the emerging post-US era.

A power-sharing government between the Taliban and Ghani would likely limit the extent to which pro-Taliban groups could destabilize Pakistan, especially in restive Baluchistan where Baloch groups have recently intensified attacks including against China's interests in the restive province.

The duality of Pakistan's objectives is leading to contradictory signalling. For instance, while Pakistan supports calls to preserve Afghanistan's post 9/11 gains and prevent the emergence of a new Taliban-led emirate, it has equally advocated the Taliban's political integration with Kabul through a political settlement.

The net effect of this dual policy has been strained ties on both sides. Sensing Pakistan's double game, the Taliban has increasingly resisted Islamabad's attempts to push them to the negotiating tables in Doha and Istanbul.

The Taliban is also reportedly quite apprehensive of US-Pakistan talk of a new military alliance after US troops withdrawal from Afghanistan, which could allow the US use of Pakistan's land and air space for counterterrorism operations inside Afghanistan including against groups aligned with the Taliban such as Al Qaeda, reported Asia Times.