At least 26 people were killed and dozens more wounded after a suicide attacker riding an explosives-laden motorcycle drove into a busy line-up and detonated outside a government office in Pakistan.

The attack happened on Tuesday at an office of the National Database and Registration Authority in the town of Mardan, in the country's northwest. 

Local resident Mohammad Zaib said he found dead bodies scattered all around when he rushed to the blast site after hearing a loud explosion.

"I was offering my prayers in my house when the blast occurred. It was a huge blast. When I came running here, there were dead bodies lying all around," Zaib told Reuters news agency. "It was like doomsday. Body parts were scattered on the ground. Rescue workers were picking up dead bodies and putting them in vehicles."


RELATED: Remembering the Peshawar school massacre


Jamaat-ul-Ahrar, a splinter group of the Pakistani Taliban, claimed responsibility, saying the office was a legitimate target as it was a part of the "heathen Pakistan state".

"God willing, we will target all Pakistani organisations that are either directly or indirectly a part of this war," Ehsanullah Ehsan, a spokesman for the group, said in a statement.

Pakistan has been battling armed groups since 2004 in a conflict that has claimed the lives of tens of thousands of civilians and security forces personnel.

Overall levels of violence have decreased in 2015 after a nationwide military-led offensive against the armed groups, blocking their sources of movement, communication and funding.

The crackdown came after the Taliban school attack in December 2014, in which more than 150 people, mostly schoolchildren, were killed.

 Revisiting Peshawar, a year after school massacre

Source: Al Jazeera and agencies