Police said they encountered fierce resistance when they stormed the compound in the village of Kaka Khel near Peshawar, the largest city in the area and the main gateway to the Afghan border region where many Al Qaeda and Taliban insurgents are based.
Militants have carried out a wave of deadly attacks in and around Peshawar in apparent retaliation for an army offensive in the tribal area of South Waziristan.
Three suicide jackets as well as a number of bombs, grenades, rocket-propelled grenades and other weapons were seized from the compound, regional police Chief Liaquat Ali Khan said.
He said one suspect was killed and five others arrested following a gunbattle that lasted more than two hours. A search operation for more militants continued in the area, some 30 miles east of Peshawar.
The detained are suspected of involvement in recent bombings and other attacks not only in Peshawar but in Islamabad and its sister city of Rawalpindi, Khan said, declining to be more specific.
Police have been on high alert since Friday's bombing-grenade attack in Rawalpindi that left 37 people dead, including several senior army officers.
Pakistani security forces also killed 13 suspected militants, including a prominent commander identified as Gul Maula, in gunbattles in two other parts of the volatile northwest over the weekend.
Maj. Mushtaq Ahmed, a military spokesman, said Maula and four others were killed in the Dangram area of the Swat Valley, where the suspected militants were spotted trying to sneak through the mountains to the main town of Mingora. Pakistan's army has waged an offensive against the Taliban in Swat for much of this year.
In the neighboring region of Lower Dir, security forces killed eight alleged militants hiding in a house in the Maidan area, said Maj. Suleman Hanif, another army spokesman. The soldiers recovered weapons including two rocket launchers and eight assault rifles.