Taliban and Pakistani security forces exchanged fire along the after Pakistani soldiers tried to erect a military structure on the Afghan-Pakistani border, causing multiple casualties on both sides, the Taliban said on Wednesday.
The Pakistani military said its forces had responded to cross-border fire from militants, and that three of its soldiers were killed.
The border was drawn up decades ago during British colonial rule and long been disputed, often leading to clashes. Pakistan treats it as an international frontier and has fenced it, while Afghan authorities do not recognise the demarcation.
"Pakistan forces tried to erect a military post near the line," Taliban spokesman Bilal Karimi said, adding that this was against the "rules" and Pakistani forces had opened fire when Taliban forces approached the construction.
He said casualties were reported on both sides, and the matter was referred to higher authorities for investigation.
The incident occurred in eastern Paktia province on the Afghan side, which borders the Pakistani area of Kurram.
Pakistan, in a statement in the early hours of Wednesday, termed the incident an exchange of fire between militants and Pakistani forces.
"Terrorists from inside Afghanistan across the international border opened fire on Pakistani troops," a statement from the military's public relations wing said.
It condemned the use of Afghan soil for what it called activities against Pakistan and that it expects authorities in Afghanistan - ruled by the hardline Islamist Taliban since August 2021 - to stop such actions.
Pakistan's foreign office did not immediately respond to a Reuters request for comment on the Taliban's assertion that Pakistani forces were building a military structure.
Tensions between Islamabad and the Taliban have increased in recent months despite historically close ties, primarily over border issues, and more recently on charges that Pakistan had allowed its air space to be used by U.S. drones to strike targets in Afghanistan.
(Reporting by Mohammad Yunus Yawar in Kabul and Jibran Ahmad in Peshawar, Pakistan; writing by Gibran Peshimam; editing by Mark Heinrich)