At least four militants, including the suicide bomber, were killed and more than 350 people freed.
An hours-long gun and bomb attack on a Kabul government compound killed at least 43 people, the health ministry said on Tuesday, making it one of the bloodiest assaults on the Afghan capital this year.
No particular militant group has claimed responsibility for the attack, which marks a bloody year for Afghanistan as long-suffering civilians and security forces are slaughtered in record numbers.
Zabiullah Mujahid, Taliban spokesman, told AFP the attack had nothing to do with the group.
Another 27 people were wounded in Monday’s raid on a site where the Ministry of Public Works and an office that handles pensions and benefits for war veterans are located, health ministry spokesman Waheed Majroh said.
Gunmen stormed the compound mid-afternoon after detonating a car bomb at the entrance, the huge blast sending terrifying government workers running for their lives. Some jumped from the windows several floors high to escape the militants.
Hundreds more were able to escape and were trapped inside buildings as security forces surrounded the area, engaging in a fierce gun shout out with the attackers.
It was the deadliest attack in the Afghan capital since a suicide bomber blew himself up in the middle of a religious gathering last month, killing at least 55 people.
The raid followed a few days in Afghanistan where officials are reeling from US President Donald Trump’s plan to cut troop numbers, which many fear could hamper efforts to end the conflict with the Taliban.
Many Afghans are worried that Ghani’s fragile unity government would soon collapse if US were withdrawn, enabling the Taliban to take over power which should potentially ignite another bloody civil war.
The attack came just hours after Pakistan’s Foreign Minister Shah Mahmood Qureshi was in the Afghan capital to discuss ways of ending Afghanistan’s 17-year war. Mr Qureshi, who traveled to Iran from Kabul, condemned the attack.
Pakistan is taking part in the latest US effort to revive the peace process. It was Pakistan that helped orchestrate last week’s talks in the United Arab Emirates. Representatives of Saudi Arabia, the UAE, Pakistan and the United States attended those talks with the Taliban.
The latest violence comes just two days after US President Donald Trump announced half of the 14,000 American soldiers in Afghanistan would be withdrawn by the summer.
Although no official announcement for the slash troop numbers, the mere suggestion of the US reducing its military presence has rattled the Afghan capital and potentially undermined peace efforts.
General Scott Miller, the top US and Nato commander in Afghanistan, said on Sunday he had been informed to pull forces out of the country.