Pakistan's military has stepped up operations along the Afghan border in recent weeks after a spate of militant attacks that has dashed any hope the frontier might see more peace and stability after the end of the war in Afghanistan.
Separatist factions have killed at least 14 Pakistani soldiers in attacks over the past month, three of them carried out by fighters entering from Afghanistan, the Pakistani military said.
Afghanistan's new Taliban rulers, struggling with a humanitarian crisis, have denied that Afghan territory was used in any of the attacks.
But despite such assurances, disputes linked to the border, which has been a bone of contention between the neighbours for decades, could undermine their relations.
The Pakistani military said six insurgents were killed in the latest clash in the resource-rich southwestern province of Balochistan on Wednesday.
"Operations to eliminate such perpetrators of terrorist acts in Pakistan will continue," the military said in a statement.
A top Pakistani security official with direct knowledge of border operations told Reuters: "We have stepped up intelligence-based operations to ensure that we deny entry to militants."
Large areas on the Pakistani side of the border were out of the control of the government for decades, ruled by fiercely independent Pashtun tribes, whose communities often straddle both sides of the unmarked border.
But Pakistan is determined to end all that, aiming to bring the rugged Pashtun lands under central rule and to demarcate the border with a fence, and control who comes and goes with a tight border-control system, another Pakistani official said.
"We're targetting anyone, whether separatists or militants, who is a threat," said the second official, who also declined to be identified.
'FRIENDS'
Pakistan has enjoyed good relations with the Afghan Taliban for years even though Pakistan was officially an ally of the United States during its 20-year occupation of Afghanistan.
But as Pakistan grapples with violence by Pakistani separatists, its appeals to the Taliban to control their side of the border have not brought the action it hopes to see.
Increasingly frustrated, Pakistani officials have been pressing the Taliban to deny space and resources to the militants, an appeal repeated by National Security Adviser Moeed Yusuf when he visited Kabul last month.
Yusuf's office did not respond to a request for comment.
In Kabul, the Taliban reject suggestions Afghan territory is used for attacks into Pakistan and hope talks can solve the problem.
"We're trying to solve such actions through diplomatic ways," defence ministry spokesman Enayatullah Khowarazmi told Reuters.
The Taliban tried late last year to facilitate talks between Pakistan and an alliance of al-Qaeda linked militants known as the Tehrik-e-Taliban Pakistan (TTP), or Pakistani Taliban. But the talks fell apart after a few weeks.
Despite the frustrations, Pakistani officials rule out the chance of any serious deterioration in relations with the Afghan Taliban.
"We're budding friends," one of the officials said.
The Pakistani military's information office did not respond to a request for comment about the scope of its operations and what the military would do if the attacks from Afghan soil continued.
Another source of friction is Pakistan's determination to finish fencing the 2,600 km border that was drawn by British colonial rulers with no consideration for the Pashtun tribes it divided. It has never been recognised by any Afghan government.
Taliban fighters have at times stopped Pakistani forces from putting up the fence, just as forces of the old US-backed Afghan government used to do.
Taliban Defence Minister Mullah Yaqoob says his government had not given anyone permission to fence the border.
"We've not taken any decision about the fencing," he told Afghan state-owned RTA TV last week.