General Shauklat Sultan,a military spokesman, said the attack was launched late on Friday near Miran Shah, the main town in volatile North Waziristan and the scene of repeated clashes between security forces and militants in the past week.
"We got information that some local and foreign miscreants were hiding in the vicinity of Miran Shah. We launched strikes with Cobra and other helicopters," General Sultan said.
"According to our initial information 25 to 30 militants were killed" in the raids, he said.
No security forces were hurt and all those present at the hideout were killed, he said, adding that the attack had triggered blasts at a huge cache of weapons which the militants had stored for use against security forces.
The spokesman did not reveal the identity or nationalities of the slain men and only said the army was still investigating.
However, an intelligence official in the region said the targeted compound belonged to a pro-Taliban cleric, Maulvi Sadiq Noor, but it was not clear whether he was present at the time.
Noor and some other pro-Taliban tribesmen have been the target of a hunt since earlier this week when their armed men captured government buildings after a military attack on an al-Qaida hideout near Miran Shah that killed dozens of people.
Pakistan is urging tribal elders to
evict foreign militants
The army raid last week on that al-Qaida hideout sparked clashes between hundreds of tribal militants and security forces that left more than 100 militants dead.
Eight Pakistani soldiers also died in the raid.
Pakistan is a major ally of the United States in its war on terror, and has asked tribal elders to evict foreign militants and their supporters from their areas or face military action.
The recent clashes in North Waziristan were the worst in Pakistan's tribal regions since 2004, when scores of al-Qaida militants, troops and local fighters died in fighting in the neighbouring South Waziristan region.
The unrest has forced thousands of residents to flee to safer areas.