At least six people were killed and six more wounded in a suicide blast outside a military academy in the Afghan capital on Thursday, an official said.
The attack outside the Marshal Fahim National Defense University in western Kabul took place at the road entrance to the war college.
Kabul police spokesman Firdaws Faramarz said the suicide bomber had been on foot. He blew himself up when a soldier challenged him.
"Based on initial information, six people killed, six wounded, police have reached the scene," Faramarz said.
The attacker "detonated himself before reaching his target", Faramarz added, without providing further details.
The attack happened around noon (0730 GMT), a time when students typically leave school early during the month of Ramadan.
No group immediately claimed responsibility.
Police and security forces in and around Kabul have come under frequent attack in recent weeks, even as the US and the Taliban have held talks about a possible peace agreement.
Opened in 2005 and named after former vice president Mohammed Fahim, the Marshal Fahim academy is modelled after US and British war colleges and trains cadets destined to become officers in Afghanistan's army.
A large annexe to the university is home to dozens of NATO troops who mentor the Afghan cadets.
The explosion was not believed to have affected operations at that centre, which lies behind multiple layers of tight security.
Agence France-Presse