Militants have attacked an army base near a military academy in the Afghan capital, Kabul, killing at least 11 soldiers.
16 other Afghan soldiers were injured in the attack, a defence ministry spokesman said.
Five militants were involved, said the spokesman. Four were killed in the attack, but one was arrested, according to a BBC report.
The attack has been claimed by the Islamic State (IS), according to the militant group's Amaq news agency.
Earlier reports said the attack took place at the Marshal Fahim National Defense University which is near the military base.
It comes days after the deadliest bombing for months hit Kabul when an ambulance packed with explosives killed at least 100 people.
Islamic State and the Taliban have increased their attacks on targets in the country in recent days.
Several explosions were heard, as well as small arms fire, as the attack began at about 05:00 local time (00:30 GMT) at the military base of the Afghan National Army in the west of Kabul.
Defence Ministry spokesman Gen Dawlat Waiziri told the BBC two attackers had blown themselves up, two others were killed by security forces and another one was arrested.
Four AK-47s, one suicide vest, and one rocket-launcher were seized, he said.
The president's spokesperson said that none of the attackers had been able to get further than the first gate, Afghan news website Tolo reported.
Afghan military institutions are frequently targeted by militants.