KABUL, Afghanistan — 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 to repair ties strained by years of mistrust 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.”

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 terror 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 armed assault on an elite university in Kabul last August, which Afghanistan blamed on Taliban militants based in Pakistan.