NEW DELHI: Pakistan and Afghanistan have agreed to co-ordinate military efforts along their shared border, following a meeting of Afghan army chief Gen Sher Mohammad Karimi and Pakistan’s Chief of Army Staff Gen Raheel Sharif in Islamabad on Tuesday. Last week, Gen Sharif had met Afghan President Ashraf Ghani in Kabul where the two countries agreed to "jointly take effective actions against terrorism and extremism".

The meetings follow a brutal attack on an army-run school in Peshawar that killed almost 150 people, most of whom were children. The attack was claimed by the Tehreek-i-Taliban Pakistan (TTP) in response to Pakistan’s ongoing military operations, Zarb-e-Azb and Khyber-1, against militants in North Waziristan and Khyber Agency respectively.

The attack has led to widespread condemnation and drawn strong words from the Pakistani army and military reiterating the establishment’s resolve to tackle terrorism within and outside its borders. “I will lead this war against terror for my people and my country and will take it to its logical conclusion, come what may,” Pakistani Prime Minister Nawaz Sharif declared at a meeting at the Prime Minister’s house on Wednesday.

The attack has focused attention on Pakistan, which has long been accused by Afghanistan for allowing the Afghan Taliban to seek refuge and garner logistical support in Pakistan -- a charge that Pakistan has denied. As such, Pakistan has been accused of differentiating between “good” Taliban and “bad” Taliban -- the former referring to militants who focus their activities on Afghanistan and Kashmir, thereby fostering Pakistan’s influence in the region, and the latter referring to the TTP and other groups who are waging an insurgency within Pakistan’s borders.

This charge led to a deteriorating relationship between the two countries, with former Afghan President Hamid Karzai being very vocal in his criticism of the Pakistani establishment’s position on terrorism and militancy. The dip in ties was evident in Karzai’s farewell address, with the outgoing president saying, “Today, I tell you again that the war in Afghanistan is not our war, but imposed on us and we are the victims,” and adding that, “No peace will arrive unless the U.S. or Pakistan want it." In the same vein, Karzai, whilst addressing the Afghan parliament a few months ago had said, that the war in Afghanistan had been “imposed” on the country and that the US should demonstrate seriousness about bringing peace to the war-torn country by targeting “terrorist sanctuaries” and countries that support “terrorism” - a reference to Pakistan.

Pakistan downplayed the remark, with the Foreign Ministry spokesperson Tasnim Aslam avoiding a direct reaction to the statement, and instead, addressing the issue rather indirectly when probed at a later date. “We face common challenges and have to confront them through collaboration… There will be a new government in Afghanistan shortly and as I said earlier, we look forward to working closely with it.”

The reason, as mentioned, for the dip in relations is militancy. There have been two developments that had increased Afghanistan’s concern that Pakistan is directly or indirectly, strengthening the Afghan Taliban. One, with the Pakistani military launching Operation Zarb-e-Azb in North Waziristan, several thousand militants have crossed the border into neighbouring Afghanistan.

Although Pakistan and Afghanistan signed a cross border agreement to monitor this movement, the process itself was fraught with tensions, with Karzai demanding that Pakistan meet a series of conditions as a prerequisite for his cooperation.

In a letter handed over to Pakistani Prime Minister Nawaz Sharif by Karzai’s top security advisor during a one day visit to Islamabad, the Afghan President stated outlined the following conditions: “(1) all terrorists are targeted without discrimination, (2) civilians are not harmed in the fight against terror, (3) Pakistan releases all detained Afghan Taliban leaders who support peace in Afghanistan, (4) all terrorist hideouts and support centres are eliminated, (5) Pakistan stops artillery shelling on Afghan territory, (6) Pakistan and Afghanistan coordinate their anti-terrorism efforts with important regional nations like India and China, (7) there should be a roadmap for bilateral coordination and contact to take the war on terror forward.”

The letter came a few days after tensions rose between the two countries following an allegation that linked the killing of three soldiers and eight civilians in Dangam district, eastern Kunar province, to Pakistani soldiers. Afghan Foreign Ministry spokesperson Ahmad Shakib Mustaghni had said that “Pakistani forces, wearing civilian clothes, carried out the attack” in Dangam district.

Pakistan’s Foreign Ministry issued a statement in response, rejecting the allegations and asking the “Afghan government to refrain from taking any action that may be detrimental to peace and stability on the border.”

These tensions, although exacerbated recently, were not new. Afghan officials have long blamed Pakistan’s Inter Service Intelligence Agency (ISI) for nurturing and supporting militancy across the border. Quoted in the Washington Post, Afghan interior minister Mohammad Umer Daudzai explained the rationale behind this suspicion when he said, “We know they [Pakistan] have not given up their dream of controlling Afghanistan. They want Afghanistan to be their satellite.”

Pakistan points out that they too are suffering from the same terrorist acts on their own soil. In the same article in the Post, Gen. Asim Bajwa, a spokesman for the Pakistani military said, “We have made it very clear that Pakistan is determined to eliminate all terrorists and sanctuaries from Pakistan and is also committed to ensure that our soil is never used for any terrorist activity abroad.”

This links to the second recent development that has added to Afghanistan’s paranoia. A few months ago, the Punjab Taliban -- an influential militant faction of the TTP -- declared that it would abandon violence within Pakistan, and focus its energy toward Afghanistan instead. “We will confine our practical jihadist role to Afghanistan in view of deteriorating situation in the region and internal situation of Pakistani jihadist movement,” Punjabi Taliban chief Ismatullah Muawiya was quoted in a pamphlet circulated to the media. The internal situation of the Pakistani Jihadist movement refers to setbacks being faced by the TTP, most recently, the breakaway of a faction led by Jamatul Ahrar -- which claims it has the support of 70-80 percent of the TTP’s fighters and commanders -- from the main TTP bloc led by Mullah Fazlullah.

Whether the Pakistani government was/is actively supporting militants in Afghanistan or not, the fact is that the militant movement in Afghanistan and Pakistan is influenced in turn by the other. In that respect, with militancy in Pakistan witnessing a reorganisation in the face of a sustained military operation, and militancy in Afghanistan seeing an increase in attacks and resulting in twice the number of fatalities as in the corresponding period last year, it is in the interest of both the Pakistani and Afghan government to cooperate and mend ties.

This seems to be the rationale that has set in since the swearing in of Afghan President Ashraf Ghani, who in a November visit to Pakistan vowed to usher in economic cooperation and a joint mechanism for tackling terrorism in the region.

“Our two countries face formidable challenges, including extremism and terrorism, a precarious security environment and trans-national crimes… I am convinced that we can effectively meet them, through common resolve and common endeavours,” Pakistani PM Sharif had said at the time.

The Peshawar attack is a tragic indication of the urgency of this resolve.