Image copyright Alamy Image caption The attack has been claimed by a faction of the Pakistani Taliban

A suspected suicide attack at a government office in north-west Pakistan has killed at least 26 people, police say.

The bomb went off outside the National Database and Registration Authority (Nadra) office in the town of Mardan.

A faction of the Pakistani Taliban said it carried out the attack, which left more than 45 others wounded.

The attack is one of the deadliest since last December's massacre of 150 pupils and teachers in Peshawar.

The bomber in Mardan reportedly arrived on a motorbike and blew himself up when stopped by a security guard outside the Nadra building.

The office is usually crowded with people queuing up to get ID cards.

Image copyright EPA Image caption Although the military has made progress in limiting attacks, they still occur regularly

Media playback is unsupported on your device Media caption Footage showed the aftermath of the attack

Officials put the death toll at 26 so far. Most of the dead and wounded are civilians, BBC correspondents say.

The Bacha Khan Medical complex has received at least 16 dead bodies and dozens of injured people, Reuters news agency reports.

Analysis: Haroon Rashid, BBC Urdu, Islamabad

Taliban-linked militants in Pakistan are desperate for good targets - this is clear from Tuesday's attack and the one that occurred at a marketplace in the Kurram tribal region earlier this month, killing 24 people.

But the situation the militants find themselves in is not new. They have been playing hide-and-seek with the Pakistani security agencies for over a decade, so although the military say they have no chance of making a comeback, they have enough experience to keep the authorities on their toes from time to time.

The militants probably want the people to know that although the military push against them means they are restricted for the time being, they are still as potently lethal as in the past.

That was demonstrated in September when Taliban gunmen stormed an air force base in Peshawar, killing 29 people - down, but definitely not out.

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 told BBC Urdu's Adil Shahzeb.

He said up to 12kg (26.5lb) of explosive material may have been used in the blast.

Jamaat-e-Ahrar, which split from the Pakistani Taliban in 2014, said it carried out the attack on what it called the "heathen Pakistan state".

The group, along with others, also claimed responsibility for an explosion that killed more than 50 people at the Wagah border crossing with India in 2014.

Pakistan's bewildering array of militants

Mohammad Khurasani, spokesman for Tehrik-e Taliban Pakistan (TTP), the main faction in the country, said the group did not support attacks on public places.

It has, however, previously claimed responsibility for many attacks on civilians, including the Peshawar school massacre in December 2014.

Tuesday's bombing is one of the deadliest since a security crackdown following that attack, which saw 150 people killed by the Pakistani Taliban.

Offensives against insurgents have reduced major militant attacks from dozens every month in 2014 to no more than one or two a month this year.

Deadly attacks in Pakistan - 2015

Image copyright AP Image caption Distraught relatives rushed to a hospital in Karachi when news of the bus attack in the city broke

30 January: Bomb blast at a Shia Mosque in Shikarpur district, Sindh province, kills at least 40 people.

13 February: Militants attack a Shia mosque in Peshawar with guns and grenades. At least 20 people killed.

15 March: Two explosions targeting worshippers attending Sunday Mass at churches in Lahore kill at least 14.

13 May: Gun attack on a bus carrying Ismaili Shia Muslims in Karachi leaves at least 45 people dead.

18 September: Taliban militants kill 29 people in an attack on an air force base in Peshawar.

13 December: Bomb blast kills 24 people at a clothes market in the Kurram tribal region.