The motorcycle-borne bomber blew himself up when a security guard stopped him outside the office of National Database and Registration Authority (NADRA), that regulates government database and manages the sensitive registration database for the entire population of Pakistan, in Mardan town of the Khyber-Pakhtunkhwa, officials said.
"If the attacker had not been stopped by a security guard at the office's gate, the death toll would be significantly higher," Mardan police Deputy Inspector General Saeed Wazir said.
He said the bomber belonged to the 22-25 age group.
An emergency rescue officer said at least 23 people were killed in the suicide blast. The attack took place at a time when some 400 people were present in the office which remains crowded most of the time.
Human body parts were seen strewn across the blast site.
The injured, several of them critical, were shifted to Mardan Medical Complex, Peshawar hospital and other facilities in the city, where a state of emergency has been declared.
Prime Minister Nawaz Sharif strongly condemned the attack and expressed deep grief over the loss of innocent lives.
Tehreek-i-Taliban Pakistan splinter group Jamaat-ul-Ahrar claimed responsibility for today's attack, saying it carried out the attack on "heathen Pakistan state".
The same outfit was also behind last year's Wagah Border blast that left over 60 people dead.
Today's bombing is one of the deadliest since a security crackdown following the Peshawar school massacre last year that saw 150 people, mostly children, killed by the Taliban.
