At least 25 people have been killed in an operation outside the Pakistani city of Miranshah near the border with Afghanistan, the military reports.
Government troops retook control of Miranshah after a fierce battle
Army spokesman Gen Shaukat Sultan said those killed were militants but there has been no independent confirmation.
Last week the area, in the tribal region of North Waziristan, saw deadly clashes between government forces and suspected pro-Taleban militias.
Reports say as many as 140 people were killed in that fighting.
Gen Sultan said the latest security operation was carried out on receiving intelligence that pro-Taleban militants were storing arms and explosives inside a residential compound to launch a big offensive.
He said helicopter gunships were called in to assist the ground forces in what he described as a highly coordinated attack to destroy the militants' hideout.
Gen Sultan said between 25 and 30 militants were killed in the rocket and mortar attack, and most of their arms and ammunition destroyed.
According to him several of those killed were foreigners but he did not give their nationalities.
The military spokesman said apparently a huge quantity of arms and explosives were stored in the compound.
Even after the initial attack, secondary explosions had continued inside the building for several hours.
The latest fighting between the tribal militants and security forces started about a week ago after hundreds of pro-Taleban fighters tried to take control of the two main towns in North Waziristan by attacking the main headquarters of the paramilitary forces in the area.
Interior Minister Aftab Khan Sherpao told the National Assembly in Islamabad on Saturday that more than 120 pro-government tribal elders had been killed by these militants since the beginning of the year, who were trying to seize control of North Waziristan.