The top political official, Mutahir Zeb, for the northwestern tribal district of Khyber was holding a meeting in his office but was not hurt in the attack.
Khyber, part of Pakistan's semi-autonomous tribal belt on the Afghan border, is currently in the grip of stepped-up fighting as part of a long-running military operation against the Taliban and other Islamist insurgents.
At least five people were killed when a suicide bomber blew himself up near the entrance to the Peshawar complex, which also contains cells where police detain suspected militants, officials said.
"We have five dead. Seven are injured. They have been admitted with serious injuries," Jamal Shah, spokesman for the Lady Reading Hospital.
"The dead include four security officials and one civilian, an old man of about 60," he added.
Some officials suggested the militants staged the attack to free detainees and unconfirmed reports indicated that some prisoners may have escaped.
Muhammad Iqbal Afridi, local leader in the opposition Pakistan Tehreek-e-Insaf party headed by former cricket star Imran Khan, told AFP that he heard heavy gunfire.
"We were inside the office when we heard gun shots. Suddenly firing started and then they hurled some grenades," Afridi said.
"Then there was intense exchange of firing between the militants and the security forces. Later, security forces evacuated us from the building. While leaving, I saw two dead bodies and blood everywhere," he added.
Witnesses said there had been three attackers. Security officials told AFP that soldiers were combing the area for the other two.
"One of them blew himself up, killing two local police officials and a search is on for other suspected suicide bombers," one of the officials said.
Violence has recently increased in Peshawar as Pakistan prepares to hold historic general elections by mid-May, which will mark the first time an elected civilian government completes a full-term in office.