A Taliban suicide attacker blew himself up inside the information and culture ministry building in the Afghan capital on Thursday, killing at least five people and wounding several more, police said.

The bomb exploded in a conference room underneath the office of the minister, Abdul Karim Khoram, but he was not in the building at the time, ministry spokesperson Hameed Nasiri Wardak told AFP.

"I can say that the target was the minister," he said.

Khoram was badly wounded in a suicide blast in the southern city of Kandahar in May.

Shaken minister in hospital visit

The minister, looking shaken, later visited a nearby hospital to check on the casualties. He confirmed to AFP that he had not been in the building at the time and it was believed to be a Taliban attack.

The Islamic Taliban — who were in power in Afghanistan between 1996 and 2001 — are waging an insurgency against the Western-backed government that has seen a record number of attacks this year, leaving hundreds dead.

The attacker had first shot dead a guard at the entrance to the building and then ran into the conference room where he blew himself up, deputy Kabul police chief General Alishah Ahmadzai told AFP.

"Three people were martyred immediately at the spot. Two others who were critically wounded died of their wounds in hospitals," he said.

The dead were four men and a woman, Ahmadzai said, and included at least one ministry employee.

"In total 23 wounded were taken to different hospitals in the city," health ministry spokesperson Abdullah Fahim told AFP, confirming two had died in hospital.

The wounded included some children at a kindergarten on the compound for ministry employees, a witness said.

A spokesperson for the Islamic Taliban militia, Zabihullah Mujahed, told AFP by telephone there had been three attackers who first shot their way in.

Two had escaped and the other had blown himself up, said the spokesperson. "The suicide bomber targeted foreign experts," he said.

"First we heard several gun shots"

It was not possible to confirm if there were any foreign nationals in the building at the time.

"First we heard several gun shots followed by a huge blast," said Mohammad Karim (26) who works in a mobile phone shop in the area.

"We all closed our shops and people were running away. It was a strong blast."

President Hamid Karzai, on a visit to Turkey, swiftly condemned on Thursday's attack in a statement. "Our enemies are trying to undermine the recent efforts by the government for a peaceful solution to end the violence," he added.

The radical Taliban who were removed from government in a US-led invasion for refusing to hand over the al-Qaeda allies for the September 2001 attacks on the United States.

Insurgent violence is concentrated mainly in southern and eastern Afghanistan but there have been several attacks inside the city this year and Taliban insurgents are said to control areas close to the capital.

A British-South African aid worker was shot dead in Kabul last week in a murder also claimed by the Taliban which said it targeted her organisation, Serve Afghanistan, because it was "preaching Christianity", which it denied.

Days later a South African and a Briton — the heads of the Afghanistan branch of international courier DHL in Kabul — were shot dead by their guard who then turned the gun on himself.

The motive for the killing is unclear with interior ministry saying it may have been a "terror attack".

Also on Thursday, a remote-controlled bomb blew up a police vehicle in the southern province of Kandahar and killed four policemen, a police commander said.

Sapa