The attack took place outside the office of the political agent, the most senior government officer in the region.
"One suicide bomber blew himself up once spotted and challenged by security agencies," the army said in a statement, adding that guards shot dead a second bomber.
The Jamaat-ur-Ahrar faction of the Pakistani Taliban, which claimed responsibility in a statement emailed to journalists, also claimed an attack in the city of Lahore on Monday in which 13 people, five of them policemen, were killed.
The group said the Lahore attack was the beginning of a new campaign against the government, security forces, the judiciary and secular political parties.
Security in Pakistan has improved in recent years but Islamist groups still pose a threat and have carried out attacks despite an army offensive launched in 2014 to push them out of their northwestern strongholds.
Last year, the same militant faction claimed an Easter Day bombing that killed more than 70 people in a park in Lahore.
More about: