The explosion took place at the headquarters in Ghalanai in the Mohmand tribal region when two suicide bombers tried to enter the colony and when signaled to stop – one blew himself up while the other was killed by firing of security forces, the Inter Services Public Relations (ISPR) said.
"Security agencies had the intelligence about intrusion of suicide bombers from Afghanistan inside Mohmand agency," the ISPR said.
The Pakistani Taliban faction Jamaat-ul-Ahrar has claimed the attack, media reports said.
The security personnel and two civilians including a school teacher were killed in the blast. At least eight others were wounded in the attack and three critically injured were shifted to Lady Reading Hospital in Peshawar, Dawn reported.
Soon after the blast the areas was sealed and a thorough search operation was started, political administration sources said.
The incident comes barely two days after a suicide blast claimed by the Jamaat-ul-Ahrar faction of the banned Pakistan Tehreek-i-Taliban (TTP) ripped through the camp of protesting chemists in front of the Punjab Assembly in Lahore, that killed 13 people.
In September last year, a suicide bomber targeted a mosque in Mohmand Agency's Anbar tehsil during Friday prayers, leaving 36 people dead. That attack too was claimed by Jamaat-ul-Ahrar.
Mohmand is one of Pakistan's seven semi-autonomous tribal districts near the Afghan border, where the military has been battling Al-Qaeda and Taliban-linked militants for over a decade.
The Operation 'Zarb-i-Azb' launched by army in June 2014 in a bid to wipe out militant bases in the tribal areas and so bring an end to the bloody insurgency has cost thousands of civilian lives since 2004.