Interior ministry spokesman Sediq Sediqqi said a suicide attacker had detonated a vehicle. Gunfire can still be heard, the BBC reports.

A Taliban spokesman said the group carried out the attack.

It comes a week after it said it was launching its "spring offensive," warning of "large-scale attacks."

Tuesday's bombing happened during the morning rush hour in a residential neighbourhood close to the ministry of defence and military compounds.

There are unverified claims that Taliban fighters managed to breach the defences of the National Directorate of Security, the main spy agency which protects high-ranking government officials.

The "blast was carried out by a suicide bomber in a car and possibly one or two bombers are still resisting," Mr. Sediqqi was quoted as saying.

"The scene of the attack has been completely cordoned off by Afghan security forces."

The presidential palace - only a few hundred metres from the blast - condemned the attack "in the strongest possible terms."

"Such cowardly terrorist attacks will not weaken the will and determination of Afghan security forces to fight against terrorism."

A tweet from President Ghani's office's official account suggested the attack "clearly shows the enemy's defeat in face-to-face battle with ANSDF" - the Afghan National Security and Defense Forces.

The Taliban has over the past year enjoyed a resurgence, buoyed by the withdrawal of most Nato and U.S. forces at the end of 2014, and a flood of foreign fighters joining their ranks.

It now controls sizeable parts of Afghanistan.