KABUL, Afghanistan (AP) -- Islamic State militants, including two suicide bombers, dressed in military uniforms and riding in two armored vehicles launched a surprise attack on the Interior Ministry in Kabul on Wednesday but Afghan forces managed to repel the assault, leaving all the attackers dead.
It was a rare victory for Afghan security forces, who have struggled to secure the capital in recent months amid relentless attacks by the Taliban and the IS affiliate in Afghanistan.
According to the ministry spokesman, Najib Danish, one policeman was killed and five were wounded in the assault.
The attack began around noon when a group of 10 militants tried to storm the ministry compound in Kabul, Danish said.
Two of the attackers detonated their explosives, allowing eight others to pass through an outer gate at the ministry where they traded fire with security forces before they were eventually killed.
Danish said the "attackers were dressed in military uniforms" -- apparently seeking to confuse Afghan security forces guarding the ministry.
Hours after the attack, the Islamic State group claimed responsibility for the assault in a brief statement carried by its Aamaq news agency. The statement called it an "immersion attack" on the ministry in Kabul.
An eyewitness at the scene, Mohammad Safi, said an explosion first went off and then bullets started flying near where he was standing with a group of people on the road.
"We ran to escape to the other side of the road," said Safi.
Like Danish, Safi also said the attackers wore military uniforms but could not provide more details. Video footage from the scene showed that the assailants wore what appeared to be imitations of U.S. military uniforms.
It wasn't immediately clear how the militants managed to penetrate so close to such a high-security location. Last year, the Interior Ministry moved into a new building, surrounded by numerous security barriers and close to the Kabul international airport and several military compounds.
Later Wednesday, the American commander of U.S. and coalition forces in Afghanistan cast doubt the attack was the work of IS, saying instead there are indications the Taliban-allied Haqqani network was behind it.
Gen. John Nicholson, speaking to reporters at the Pentagon from his Kabul office, said U.S. forces "believe it was a Taliban-Haqqani attack, but we're still developing that information."
The tactics used in the attack "track with" the tactics that the Haqqani faction has used in the past, he said and added: "We at this time do not believe it was an ISIS attack." ISIS is an alternative acronym for IS.
The Taliban and the Afghan IS affiliate have both carried out scores of attacks, mainly targeting security forces and the country's Shiite minority, that have killed hundreds of people in recent years.
Both militant groups seek to establish strict Islamic rule in the country. 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 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.