The heavily armed militants attacked the check post at Shalotal in Upper Dir district of Khyber-Pakhtunkhwa province early yesterday and gun battles between the militants and troops continued for over 24 hours.
Officials said 25 security personnel had died so far and efforts were underway to evacuate the bodies. The check post attacked by the militants is located close to the border with Kunar province of Afghanistan.
The local administration rushed additional policemen and Frontier Constabulary troops to the area to flush out the militants. Helicopter gunships too were used in the operation.
The army had conducted a major operation against the Taliban in Dir and nearby areas two years ago.
At least 13 Pakistani security personnel were killed in a similar cross-border raid by Taliban in the Lower Dir region two months ago.