KABUL, Afghanistan — Militants attacked an army unit near Afghanistan’s main military university early Monday, killing at least 11 Afghan soldiers and wounding 16 others in what has been an intense period of violence in Kabul, the capital.

Gen. Dawlat Waziri, a spokesman for the Ministry of Defense, said five militants were involved in the attack on a unit of the army’s 111th Capital Division, which is based next to the university.

“I don’t know how they entered, but two of them blew themselves up after entering, the third and fourth were gunned down by security forces, and a fifth attacker was arrested,” General Waziri said.