The blast rocked Kabul on Tuesday morning -- the apparent work of Taliban militants targeting a security team that protects government VIPs, a police official said.
In addition to the deaths, more than 300 people were wounded, Interior Ministry spokesman Sediq Sediqi said
Despite the target, most of the victims were civilians -- including women and children, according to Sediqi.
A suicide bomber detonated a vehicle filled with explosives in a private parking lot behind the compound, destroying the back wall of a building, according to Sediqi.
A second attacker then entered the building. That attacker died in a gun battle with security forces less than two hours later, Sediqi said.
The Afghan Taliban
claimed responsibility for the attack.
"First a suicide bomber blew up his explosives-laden lorry on the gate of the department and then other armed attackers went in and started shooting on the rest of the enemies," the statement said.
Witnesses said they continued to hear gunfire after the explosion, which occurred in a busy part of Kabul near the Afghan Defense Ministry and presidential palace.
Afghan journalist Esmatullah Kohsar tweeted photos of what he said were windows at his office shattered by the blast. He said he could hear gunfire following the explosion.
Afghan women's rights activist Wazhma Frogh said on Twitter she was arriving at work near the site of the attack when the blast happened.
"There are schools in the explosion area," she tweeted
. "Parents running to the doors to take their children. Sad day in Kabul."
The attack comes a week after the Taliban declared the start of a spring offensive, designed to "employ all means at our disposal to bog the enemy down in a war of attrition that lowers the morale of the foreign invaders and their internal armed militias."
The commander of NATO forces in Afghanistan, Gen. John W. Nicholson, said such attacks are a sign of Taliban weakness.
"Today's attack shows the insurgents are unable to meet Afghan forces on the battlefield and must resort to these terrorist attacks," he said.
Afghan President Mohammad Ashraf Ghani condemned the attack and said in a tweet it "clearly shows the enemy's defeat in face-to-face battle" with government forces.
A record number of civilians died or were wounded in hostilities in Afghanistan last year, the United Nations said in February. More than 3,500 civilians died and nearly 7,500 were wounded in 2015, it said.
An additional 5,500 Afghan security force members died last year, according to U.S. estimates.
The U.N. Security Council condemned the attack and said it remained concerned by threats posed by the Taliban, ISIS and al Qaeda.