Image copyright AFP Image caption Afghan security forces rushed to the scene of the blast

A suicide bomber has killed 20 people at a police headquarters in the Afghan capital Kabul, officials say.

At least 29 others were wounded in the blast in the west of the city, the interior ministry said.

Some reports suggest most of those killed and injured were police officers. Earlier reports said most of the dead were civilians.

The Taliban said they carried out the bombing - one of a string of attacks in Kabul and elsewhere in recent months.

Monday's attack happened at the entrance of the headquarters of the National Civil Order Police, a unit that has a counterinsurgency role against the Taliban.

Officials initially blamed a suicide car bomber, but later said the attacker had joined people queuing to get into the police station before he detonated his explosives.

"I saw three dead bodies on the ground and a number of other people wounded, then ambulances arrived and took all the victims away from the attack site," one man told Reuters news agency.

A spokesman for Nato-led forces in Afghanistan, Brig Gen Wilson Shoffner, said: "This attack on the Afghan police shows the contempt the Taliban have for the rule of law in Afghanistan and for those who commit themselves daily to defending the Afghan people.

"The Taliban have no plan for the development of Afghanistan. Targeting those who defend their fellow Afghans does not advance the cause of peace."

Image copyright AP Image caption Fire service personnel were seen cleaning the streets in the aftermath of the attack

The bombing follows a spate of attacks in January, one of which killed seven staff from the Tolo media group in Kabul. Several other attacks were near foreign diplomatic missions.

There has been speculation that the attacks may be aimed at destabilising attempts to revive peace talks with the Taliban.

Others have suggested that the Taliban's winter offensive may be an attempt by their new leader to strengthen his hand in any talks.

Last month, Afghan President Ashraf Ghani warned that if negotiations did not start by April the conflict would intensify, with consequences across the region.

"Time is not a friend," he told the BBC. "We all understand that February and March are crucial."