Clashes erupted when troops reoccupied a border post
At least five Pakistani troops and about 25 pro-Taleban militants have died in fierce clashes at a tribal area along the Afghan border, officials say.
The battle took place in the Loi Sum area in Bajaur, which has seen missile attacks in the past.
But this is the first time troops have fought militants there on the ground.
Talks between Pakistan's new government and Taleban leaders broke down in June and security has deteriorated sharply in recent weeks along the frontier.
In other violence in the north-west, suspected militants burnt down a girls' college and a school in Swat district, police said.
Pakistani officials say the fighting started after more than 200 troops moved to reoccupy a key border post abandoned several months ago following frequent Taleban attacks.
They said their convoy was ambushed late on Wednesday by militants using rockets and automatic weapons. Government forces used helicopter gunships to target the militants, and their suspected hideouts.
Residents said a Taleban leader in Bajaur, Maulvi Faqir Mohammad, has warned locals over the radio not to leave the area. He said anyone found to have passed information to the government would be beheaded.
A Taleban spokesman told the BBC militants had killed 22 members of the security forces and kidnapped another 17 in the Federally Administered Tribal Area.
Maj Murad Khan told the BBC five Pakistani troops had been killed but an unnamed security official told AFP news agency 10 soldiers had died.
The area is strategically located between Bajaur and Mohmand tribal districts close to the Afghan border.
Wednesday's move by the security forces indicates they plan to close this route, says the BBC's M Ilyas Khan.
BBC West Asia analyst Elettra Neysmith says there is mounting pressure on the Pakistani government from the US to crack down on fighters using the lawless tribal regions to launch cross-border raids into Afghanistan to target coalition forces.