Islamic State militants attacked Afghan soldiers guarding a military academy in the capital of Kabul on Monday, killing at least 11 troops and wounding 16 others.

The attack was the latest in a wave of relentless violence in Kabul this month unleashed by the Taliban and the rival Islamic State group that has killed scores and left hundreds wounded.

Monday’s attack started at around 4am, witnesses said, and fighting continued long after daybreak.

Afghan security personnel arrive at the site of an attack at the Marshal Fahim academy (Rahmat Gul/AP)
Afghan security personnel arrive at the site of the attack at the Marshal Fahim academy (Rahmat Gul/AP)

A suicide bomber first struck the military unit responsible for providing security for the academy, followed by a gun battle with the troops, said Dawlat Waziri, spokesman for the Afghan defence ministry.

At least five insurgents were involved in the morning assault, according to Mr Waziri. Two of the attackers were killed in the gun battle, two detonated their suicide vests and one was arrested by the troops, he said.

All roads leading to the military academy were blocked by police, which only allowed ambulances access to the site to transfer the wounded to hospitals.

Afghanistan
Afghan security personnel detain a suspect at the scene (Rahmat Gul/AP)

After the gun battle ended, the security forces resumed control of the area. They also confiscated one suicide vest, an AK-47 and some ammunition, Mr Waziri said.

Earlier, he said that five soldiers were killed but later raised the death toll to 11. He insisted, however, that “the attack was against an army unit providing security for the academy and not the academy itself”.

Afzal Aman, commander of the city’s military garrison, confirmed the attack in the area of the Marshal Fahim military academy.

Hashmat Faqeri, a resident near the site, told the Associated Press he heard sounds of explosions and a gun battle.

Hours later, the Islamic State group’s affiliate in Afghanistan, known as Khorasan Province, posted its claim of responsibility on the website of its media arm, the Aamaq news agency, saying its fighters targeted the “military academy in Kabul”.

An Afghan official and an eyewitness say blasts have been heard and a gun battle took place (Rahmat Gul/AP)
An Afghan official and an eyewitness say blasts were heard and a gun battle took place (Rahmat Gul/AP)

The same academy was also attacked in October last year by a suicide bomber who killed 15 officers. The attacker was on foot and detonated his suicide vest as the on-duty officers were leaving the facility, heading home in the evening. That attack was claimed by the Taliban.

Both the Taliban and IS have stepped up attacks in recent months in Kabul and elsewhere across Afghanistan, including massive bombings staged by militants determined to inflict maximum casualties, instil terror in the population and undermine confidence in Afghan President Ashraf Ghani’s government and the country’s security forces.

On Saturday, a Taliban attacker drove an ambulance filled with explosives into the heart of the city, killing at least 103 people and wounding as many as 235.

Interior Minister Wais Ahmad Barmak said on Sunday that the investigation into the attack indicated that a second ambulance was also involved but had left the area, indicating some would-be attackers may have escaped.

The Taliban claimed the ambulance attack, as well as an attack a week earlier in which militants stormed a hilltop hotel in Kabul, the Intercontinental, killing 22 people, including 14 foreigners, and setting off a 13-hour battle with security forces.

Afghanistan
Afghan women leave the area of the attack on the military academy (Rahmat Gul/AP)

Masoom Stanekzai, the head of Afghanistan’s intelligence service, said five suspects have been arrested for their involvement in the hotel attack. A sixth suspect had fled the country, he said.

He also said that four people have been arrested in connection with Saturday’s ambulance attack.

The recent brutal attacks have underscored the weaknesses of Afghan security forces, more than 16 years after the U.S.-led invasion toppled the Taliban, and raise questions about President Donald Trump’s strategy for winning America’s longest war.

The Taliban have been waging an insurgency since they were driven from power by U.S. and Afghan forces after the Sept. 11 attacks. In recent years, they have seized districts across the country and carried out near-daily attacks, mainly targeting Afghan security forces and the U.S.-backed government.

The Islamic State affiliate in Afghanistan emerged in 2014, as the U.S. and NATO were winding down their combat mission and around the time that IS declared its self-styled Islamic caliphate, headquartered in Syria and Iraq. Its followers have clashed with both Afghan forces and the Taliban.