ISLAMABAD — Afghan and Pakistani troops continue to face off along part of their mutual border after an exchange of fire early Wednesday reportedly caused casualties on both sides.

Analysts believe the fighting could undermine what had until recently been a warming bilateral relationship, but at the same time there are considerable pressures on both sides to stop any escalation.

The media arm of Pakistan's military, Inter Services Public Relations (ISPR), released a statement Wednesday stating "An RPG-7 rocket and a few rounds of small arms were fired on Angoor Adda gate from the Afghan side due to which 2 Pakistani security personnel were injured. Pakistani troops responded and targeted positions from where fire was coming."

Official Afghan sources state there was one fatality on the Afghan side, sparked by construction work being undertaken by the Pakistanis. Pakistan's ambassador to Kabul was later summoned by the Afghan government over the incident.

However, Claude Rakisits, nonresident senior fellow at the Atlantic Council's South Asia Center, does not believe the situation will escalate, primarily because it is not in the interest of neither country to do so.

He highlights a number of factors on the Afghan side that would encourage Kabul to try and reduce tensions because "even though [Afghan] President Ghani recently went very public about his frustration with Pakistan's failure to stop the recent Taliban attacks in Afghanistan, he also knows that he has little choice but to work with Pakistan," he said.

Adding, "Having dumped the Indians in favor of China and Pakistan, his country's future is now intimately linked to the success of China's recently signed $46 billion China-Pakistan Economic Corridor [CPEC] project, which if fully implemented will be good news for Afghanistan and its economic development."

Though this project is being undertaken in Pakistan, Rakisits says both Afghanistan and Pakistan are under pressure from China to maintain a good bilateral relationship, not least because of China's own security interests.

"Given China's massive investment in building up Pakistan's decrepit infrastructure, its leaders will expect the Pakistan military to ruthlessly hunt down the Taliban and their fellow ideological travelers, including the Uighur-dominated East Turkestan Islamic Movement [ETIM]."

Though Pakistan is seen as China's main concern and closest ally in South Asia, Beijing also has strong interests in a secure and stable Afghanistan under government control.

"Like President Ghani, Chinese President Xi does not want to see the Taliban return to power in Kabul, as this would provide the ETIM with a friendly haven from where to launch terrorist attacks into Xinjiang province," Rakisits said.

The skirmish comes at a delicate time as Pakistan makes final preparations to eradicate the remaining pockets of the Pakistani Taliban (TTP), their allies and affiliates.

Remaining TTP positions in North Waziristan's Shawal Valley are being softened up by air strikes before ground troops move into the heavily forested mountainous area. Some terrorists are already reported to have slipped across the border into Afghanistan.

However, author, analyst, and former Australian defense attache to Islamabad Brian Cloughley says "matters in Afghanistan are being conducted emotionally rather than with an eye to pragmatism and the aim of defeating insurgents."

He believes Afghan irredentism is so strong it negates pressure on Kabul to maintain good relations with Pakistan.

"The fact of the matter is that the Afghans are still not prepared to accept the validity of the border as defined by the Durand Line which, contrary to all the noisy statements over the years by [former Afghan President Hamid] Karzai and so forth, is the legal boundary, accepted by Afghanistan in the past and not subject to alteration," he said.

He says Kabul's view was strengthened by the US, however.

"The US tacitly accepted the Afghan position when Washington refused to build barriers along the border, which had been proposed by Pakistan in order to prevent incursions both ways and have left Kabul in the position of having had achieved international support for its faulty stance."

Elsewhere, Iran fired mortar rounds into the Killi Nakar and Gorkadan areas of Pakistan's Balochistan province late Tuesday, the third time in a week it has targeted alleged terrorists crossing the border to attack Iran.

The terrorist group Jaish al-Adl killed eight Iranian border guards in April, but no casualties have been reported in this latest incident.

Again, Rakisits believes this situation will be contained as neither Iran nor Pakistan desire escalation.

He draws attention to the recently announced "3,500 posts for Levies and Khasadar forces to maintain law and order in Balochistan," and also Chinese strategic interests plus the Iran-Pakistan gas pipeline project, as stabilizing factors.

"As part of the Chinese-funded CPEC project, the gas line on the Pakistan side of the border will be completed so that Iranian gas can start flowing through. Accordingly, Pakistan and China will want to make sure that bilateral relations between Tehran and Islamabad remain on an even keel," he said.

Adding, "China has a lot riding on this CPEC project, including the $1.6 billion upgrade of the port of Gwadar, which is less than 50 miles from the Iranian-Pakistan border."