Four Pakistani soldiers were killed and four others wounded in a cross-border attack by militants from Afghanistan on Sunday, Pakistan military said.
Attack came from the Akhandwala Pass, the 2,400 metre (8,000 foot) high pass in the mountainous Kyhber region on the Afghan border.
"Pakistani troops befittingly responded and eliminated the group of terrorists” the military added.
Pakistan and Afghanistan has been accusing each other of not doing enough against Taliban and Al Qaeda.
Afghanistan has been accusing Pakistan of tolerating or even supporting the Afghan Taliban.
Islamabad, on the other hand, says the leadership of the Pakistani Taliban which is loosely allied with the Afghan Taliban and fighting mostly against Pakistan's government - is based in Afghanistan.
Afghanistan government and Taliban had been holding peace talks earlier this year but revelations at the end of July that the group's leader Mullah Omar had died about two years ago stalled the process.
Since then, Taliban has increased its attacks in Afghanistan and killed dozens.