Among the dead were four civilians and three police officers, while another eight civilians were wounded. Daesh has claimed responsibility for the attack in Kabul.
A suicide blast rocked Afghanistan's capital Saturday during a gun battle with security forces, officials said, killing at least seven people a day after hopes for all-encompassing peace talks collapsed. At least eight people were wounded.
Police chief Gen. Sayed Mohammad Roshandil said the bomber blew himself up outside the Telecommunications Ministry, clearing the way for four gunmen to enter the building and the heavily guarded government compound in central Kabul.
Nasart Rahimi, a spokesman for the Interior Ministry, said four civilians and three soldiers were killed during the attack.
Eight civilians were wounded, he said.
Daesh has claimed responsibility for the attack.
TRT World's Bilal Sarwary brings more from Kabul.
Shahzad Aryobee, Minister of Communications and Information Technologies, said on Twitter that "I strongly condemn terrorist attack martyred 5 of our colleagues. We send our thoughts and prayers to those affected."
The cowardly attack on the @mcitaf compound ended. I strongly condemn terrorist attack martyred 5 of our colleagues. We send our thoughts and prayers to those affected. We will continue to combat terrorism in our country. I thank you the #ANSF survived above 2000 our brave staff pic.twitter.com/yFGPoa9ww5— Shahzad Aryobee (@sharyobee) April 20, 2019
Wahidullah Mayar, spokesman for the Public Health Ministry, said the wounded people were evacuated to hospitals, three of them women.
Both Taliban insurgents and the Daesh are active in eastern Afghanistan and have previously claimed attacks in Kabul.
The Taliban denied involvement.
Attack on central post office:— Ministry of Interior (@moiafghanistan) April 20, 2019
Operations finished. All suicide bombers killed & more than 2000 civilians staff rescued.
Rahimi said the security operation ended at the Ministry of Telecommunication "after all four attackers were shot and killed by Afghan security forces."
The attack came a day after Afghan-to-Afghan peace talks in Qatar were cancelled. It would have marked the first time that Taliban and Kabul government officials sat together to negotiate an end to the war in Afghanistan and a withdrawal of US troops.
Afghan president Ashraf Ghani strongly condemned the attack in a statement, saying the enemies of Afghanistan, by targeting civil servants, are trying to create terror among the people.
Rahimi said security forces blocked all roads near the attack site and that forced shot and killed four additional suicide bombers before the attackers could reach their target of the nearby central post office.
He said as many as 2,700 government employees and civilians were rescued by security forces after being stuck in several government buildings including the central post office.
An employee of the Telecommunication Ministry who was rescued, Hamid Popalzai, said "an explosion happened and then we heard the sound of gunfire and more explosions."
He added that a large number of people were inside the ministry, both women and men, when the attack started.
Live footage on local TV showed government employees fleeing neighbouring Information and Culture Ministry buildings, with some climbing out of windows.