Suspected militants set off a blast while making bombs at their compound in northwestern Pakistan on Saturday, killing at least eight people, including a woman and three children, army officials said.

The explosion occurred in the tribal village of Mosaki, about 20 kilometres east of Miran Shah, the main town in the North Waziristan tribal region, army spokesman Major General Shaukat Sultan said.

Several male foreigners were among those killed, but Sultan said he did not have their identities or nationalities, and it was not immediately clear if top Taliban or Al Qaida suspects were among them.

The suspects set off the blast while making detonators for improvised bombs at their mud-walled compound, Sultan said.

An army officer in Peshawar and a security official in Miran Shah, speaking on condition of anonymity because they were not authorised to speak to the media, said eight people had died, including three children. Sultan said a woman also was among the dead.

The Miran Shah-based official said all the children were girls. Mosaki is in a part of the North West Frontier Province that was not affected by South Asia's October 8 quake.

Military officials say hundreds of Arab, Afghan and Central Asian militants with alleged links to Al Qaida operate in the rugged area, near the border with Afghanistan.

Security officials blame militants there for roadside bombings and rocket attacks against soldiers in tribal regions of North and South Waziristan.

Pakistan, an ally of the United States in the war against terrorism, has deployed thousands of troops to that region to hunt down militants, killing and capturing several of them.

Mosaki residents said the suspected militants, who appeared to be Arabs, rented the compound and had been staying there for several months.