A suicide bombing, claimed by the Pakistani Taliban faction, has killed three policemen and two passers-by in the administrative headquarters of a tribal region in northwestern Pakistan, officials said.

The explosion went off at the main gate of the tribal headquarters in Ghalanai, in the Mohmand tribal region, just as the workday was about to start on Wednesday, said Hameedullah Khan, a local government official.

A breakaway faction of the Pakistani Taliban, Jamaat-ul-Ahrar group, claimed the attack in a statement sent to media.

Khan, whose office is inside the compound, said the grounds contain homes, offices and training facilities for the local administration and police employees.

READ MORE: Pakistan mourns victims of Lahore rally blast

The Pakistani army said the bomber was accompanied by another fighter, who tried to force his way into the compound after the explosion went off but that security guards opened fire and killed him.

Hundreds of local residents come daily on business to the tribal headquarters, located 45km outside Peshawar, the provincial capital.

Wednesday's attack, and another suicide bombing that killed 13 in the eastern Pakistani city of Lahore on Monday, reflect an increase in attacks by armed groups after almost a three-month lull.

The Jamaat-ul-Ahrar group claimed the Lahore attack. Seven police officers died in that bombing, including a former chief of the province's counterterrorism department.

A spokesman for the group warned in a statement that the blast was "just the start".