Many of the dead were civilians, Kabul police chief Abdul Rahman Rahini said, confirming the 28 deaths.
The deafening explosion was followed by heavy gunfire as Taliban militants launched an attack.
The intended target appeared to be a Secret Service Unit tasked
with protecting VIPs, officials were quoted as saying. Some reports said
gunmen managed to enter the unit's perimeter.
Ismael Kawosi, head of the media department at the ministry of
public health, said 327 people were wounded and rushed to hospitals
following the explosion.
Tolo News reported that security forces cordoned off the area as heavy gunfire raged for some two hours after the blast.
The Secret Unit's compound is situated close to the ministry of defense in Pul-e-Mahmood Khan area.
By late morning, the security forces had largely managed to bring the situation under control, officials said.
President Ashraf Ghani condemned the incident and labelled it a terrorist attack. The Taliban group claimed responsibility.
A statement issued by the president's office said such attacks
showed the insurgents' inability to tackle security forces on the
battlefield face to face.
Interior ministry spokesman Sediq Sediqqi said one of the attackers had been killed by security forces.
A Tolo News correspondent at the scene reported that special forces
were deployed to the area to bring the situation under control.
Security forces were also seen on the roofs of surrounding government
offices.
Widespread damage was reported to buildings and houses in the vicinity.