An ISIS suicide bomber struck outside the Afghan Interior Ministry on Wednesday, allowing several gunmen to pass through an outer gate where they traded fire with security forces, who eventually killed the attackers, officials said.
Gen. Daud Amin, the Kabul police chief, said seven attackers were killed and that cleanup operations were underway.
Najib Danish, the ministry spokesman, confirmed the attack was carried out by a group of 10 militants and at least one policeman was killed and five were wounded. Danish said the attackers were wearing military uniforms.
A senior ministry official said one attacker blew himself up inside the compound and another was resisting from a watchtower as a plume of dust and smoke rose over the sprawling site.
Officials inside the ministry said the attackers could not breach key buildings as they are located far from the main entrance and there is a wide flat space inside the compound, helping Afghan forces to subdue the attack quickly.
Hours after the attack, the ISIS group claimed responsibility for the bombing in a brief statement carried by its Aamaq news agency. The statement called it an "immersion attack" on the ministry in Kabul.
It appeared to be a rare victory for Afghan security forces, who have struggled to secure the capital in recent months.
The Taliban and a local ISIS affiliate have carried out scores of attacks, mainly targeting security forces, that have killed hundreds of people in recent years.
Their relentless assaults underscore the struggles that Afghan forces have faced since the United States and NATO concluded their combat mission in Afghanistan at the end of 2014.
Elsewhere in Afghanistan, the Taliban attacked a district headquarters in the northern Takhar province, killing five security forces, according to provincial police spokesman Khalil Asir. He said another three people were wounded in the battle Wednesday. He said 10 insurgents were killed.
In the eastern Logar province, Taliban suicide bombers attacked a police station, killing at least three policemen. Among the dead were the commander of the police station and the deputy director of traffic police for Puli Alim, the provincial capital, said Khalid Safi, a spokesman for the governor.
Another four policemen and eight civilians, including two children, were wounded in the Logar attack early on Wednesday, said Shah Poor Ahmadzai, spokesman for the provincial police chief.
He said the attackers set off a suicide car bomb at the entrance to the station before three suicide bombers tried to enter. He said all three were shot and killed by security forces within minutes of the initial attack, adding that a number of nearby homes were damaged.
The Taliban claimed the attacks in both provinces.
In the southern city of Kandahar, a roadside bomb killed three people and wounded another 13, said Daud Ahmadi, spokesman for the Kandahar provincial governor. He said the victims included mechanics who had been contracted to repair Afghan army vehicles. No one immediately claimed the attack.