The bombing in the compound, used by a local militia and containing residential units and an office, occurred near the village of Spin Tal in the Orakzai tribal region. The Pakistan military has been conducting operations against militant groups in the area for months.
"We are not sure if a suicide bomber hit the compound or if some militants were assembling a bomb and it accidentally went off," a local government official said, requesting anonymity.
The wounded were evacuated to a hospital in neighboring Hangu district. A hospital official told Reuters that several of the wounded were in critical condition.
Several militant groups are active in Pakistan's northwestern semi-autonomous tribal regions, near the border with Afghanistan, including the Pakistan Taliban, responsible for many of the bombings across the country in recent years.
In southwestern Baluchistan province, militants attacked a coast guard post, killing six personnel, local officials said.
The attackers arrived aboard pick-up trucks and motorcycles and fired rocket-propelled grenades and assault rifles at the post near the Arabian Sea coastal town of Peshikan in Gwadar district.
Much of the violence in Baluchistan, Pakistan's biggest but poorest province, has been blamed on ethnic Baluch separatists, who are fighting a protracted insurgency, demanding more autonomy and control over natural resources.
Islamist militants loyal to al Qaeda and the Taliban are also active in the province, which borders Iran and Afghanistan.
(Reporting by Ali Afzaal in PARACHINAR and Gul Yusufzai in QUETTA; Additional reporting by Haji Mujtaba in MIRANSHAH; Writing by Qasim Nauman; Editing by Ron Popeski; Editing by Ron Popeski)
PARACHINAR, Pakistan | Sat Jul 21, 2012 11:06am BST