A car bombing at a police post killed at least three officers in northwestern Pakistan on Saturday and was followed by an ambush on police personnel rushing to the scene to provide backup, security officials said.
Police official Sajjad Khan said most of the 15 officers who were on duty at the post on the outskirts of the city of Bannu were feared dead and that the installation had been destroyed.
He added the fighting was ongoing and the extent of the damage would only be known once the operation was over.
"The terrorists first attacked the police post with an explosives-laden car, and then militants entered its premises and opened fire on the police personnel," another police official said, asking not to be identified.
"Other law enforcement personnel were sent to help the police, but the terrorists ambushed them and caused some casualties."
Police sources said the militants also used drones in the attack.
Ambulances from rescue agencies and civil hospitals were dispatched to the scene, with officials saying a state of emergency has been declared in government hospitals in Bannu.
A militant alliance known as the Ittehad-ul-Mujahideen claimed responsibility for the attack.
Militant attacks have the potential to reignite fighting along Pakistan's border with Afghanistan. The worst fighting in years erupted between the allies-turned-foes in February, with Pakistani airstrikes inside Afghanistan that Islamabad said targeted militant strongholds.
Fighting has since eased, with occasional skirmishes breaking out along the border, but no official ceasefire has been brokered.
Islamabad blames Kabul for harbouring militants who use Afghan soil to plot attacks in Pakistan.
The Taliban has denied the allegations and said militancy in Pakistan is an internal problem.