Personnel from the Pakistani border security force prepare to deploy to the Afghan border on May 5, 2017. (Banaras Khan/AFP via Getty Images)

Pakistan claimed Sunday to have killed 50 Afghan border troops, wounded 100 and destroyed five of their posts in sporadic clashes since Friday near a major border crossing. Afghan officials called the high death toll “baseless” but said that several days of cross-border skirmishes had left two Afghan troops dead. 

The fighting in Afghanistan’s southern Kandahar province, and the conflicting accounts of what happened, highlighted the hair-trigger state of relations that persist between the two Muslim-majority countries, despite recent diplomatic overtures by Pakistan aimed at repairing ties strained by years of mistrust and finger-pointing over terrorist and insurgent activities in the region.

Pakistan claimed that Afghan border police had fired first, without provocation, at armed guards escorting Pakistani census teams in the border community of Chaman, killing nine people and injuring 40.

 Afghan officials said the Pakistani team and its uniformed Frontier Corps guards had crossed into Afghan territory, but they did not provide a detailed account of the incidents.

A Pakistani Frontier Corps official, Maj. Gen. Nadeem Ahmad Anjum, told journalists at the  border crossing that two Pakistani soldiers were killed and nine wounded in the fighting, which began Friday. He said Pakistan had fired in retaliation but was “not happy” over the Afghan casualties, “as they are our Muslim brothers.”

Afghan Border Police personnel keep watch during an ongoing battle between Pakistani and Afghan Border forces near the Durand line at Spin Boldak, in southern Kandahar province. Pakistani and Afghan officials have accused each other of killing civilians after gunfire erupted near a major border crossing where Pakistani census officials were carrying out a count, exacerbating tensions between the neighbours. (Javed Tanveer/AFP via Getty Images)

But Sediq Siddiqi, a senior spokesman for the Kabul government, said Sunday he “totally rejected” as “very false” the Pakistani claim of 50 Afghan dead. A spokesman for the Interior Ministry, which oversees the Afghan border police, also said the claim was “totally baseless.”

The eruption of violence came even as Pakistan has been trying to patch up relations. Last week a high-ranking military delegation and a group of legislators visited Kabul, and the chief of Pakistan’s military-run intelligence agency — long accused by Afghan officials of sponsoring violent Islamic militants and orchestrating terrorist attacks on Afghanistan — also made an unannounced, highly unusual visit. 

 But Afghan President Ashraf Ghani turned down their invitation to visit Pakistan, bluntly telling the Pakistanis that he would not come until Pakistan arrested and turned over the perpetrators of several high-profile attacks, including a bombing and an armed assault on an elite university in Kabul last August, which Afghanistan blamed on Taliban militants based in Pakistan.

  The atmosphere is especially tense along the conflicted, 1,400-mile border, where both countries have accused each other of staging attacks. Chaman, the densely populated Pakistani town that abuts the community of Spin Boldak in Afghanistan, is often cited by Afghan officials as a launching pad for suicide bombers and for other insurgent activities. The border line itself has been historically disputed, making confrontations more likely.   

 Hundreds of miles north, near the other major crossing, at Torkham, both governments have recently traded attacks and accusations of harboring cross-border terrorists. In February, after a series of deadly terrorist bombings across Pakistan, the Islamabad government charged that the assailants had been based on the Afghan side. Pakistan shelled the area for days and shut the border down. It also accused its rival India of collaborating with Afghan intelligence forces in the area.

 Both the recent flurry of goodwill gestures and the outbreak of fighting came as Pakistan and Afghanistan are waiting uneasily for the Trump administration to define its policies in the volatile region. So far, it seems likely that the United States will send more troops to Afghanistan as top U.S. military leaders have urged, but Washington’s treatment of Pakistan may depend on how far it goes to rein in Islamist militants based there.

In the past several days, analysts in both countries reflected the frustrations of their respective leaders. In Pakistan, an editorial in the News International newspaper Saturday declared, “Peace needs to be a two-way street and right now Afghanistan is not cooperating. . . . Refusing to visit the country or firing on civilians and security forces destroys whatever little hope there is for progress.”

In Afghanistan, some observers expressed disappointment that Ghani had rebuffed Pakistan’s invitation. They noted that he had just cemented a peace deal with Gulbuddin Hekmatyar, the fugitive Afghan warlord who returned to Kabul last week, and said Ghani should also take the opportunity to see if Pakistan is now more willing to play a role in bringing peace.

But Rahmatullah Nabil, a former head of Afghanistan’s intelligence service, said in a Facebook post that Pakistan’s diplomatic outreach had a “hidden agenda” and that its security establishment wants to “soften the new U.S. policy,” while continuing to support the Taliban, by “pretending to show that they are willing to work with Afghan government.”

“This is a time-honored Pakistani tactic,” he wrote.