The attack on Saturday was launched in Drub Lokai, a town in the North Waziristan tribal region where foreign fighters and their local supporters are believed to be hiding, the military said in a brief statement.
Pakistan is trying to clear its rugged, semi-autonomous border lands of militants, many of whom fled there after US and Afghan opposition forces overthrew the Taliban's Kabul government in late 2001.
Spokesman Major-General Shaukat Sultan said the attack was launched before dawn and destroyed about 70% of a compound the men were at.
"We believe we killed 15 to 20 miscreants," he said.
Aljazeera’s correspondent in Pakistan, Ahmad Barakat, reported that Pakistani Taliban, Uzbek, Tajik, and Chechen fighters are among those killed.
He said no prominent al-Qaeda figures were in the compound that lies just 5km from the Pakistani-Afghan border.
Pakistani helicopters continued to hover over the area while the Pakistani army surrounded the compound and removed the bodies to identify them, he said.
Foreign al-Qaeda supporters, including many from Central Asia, are known to take refuge in the area, and clashes have intensified in the region since an air strike on an al-Qaeda compound in early March.
Altogether security forces have killed more than 300 fighters, including about 75 foreigners, in North Waziristan since the middle of last year.
Pakistan, a key ally of the United States in its "war on terror", has deployed about 80,000 troops in the tribal areas bordering Afghanistan to flush out foreign fighters and their local supporters.