KABUL (Reuters) – A suicide bomber blew himself up at the entrance to a military training center in the Afghan capital on Thursday, killing at least six people and wounding six, police and security officials said.

Islamic State claimed responsibility for the attack in a statement on its Amaq news agency.

One official, who spoke on condition of anonymity, said the attacker detonated his explosives after being prevented from entering the Marshal Fahim National Defense University, to the west of Kabul.

The attack came as cadets were leaving the college, which is one of Afghanistan's main officer training academies. It also came as Taliban representatives met senior Afghan politicians in Moscow as part of efforts to reach a settlement to end the 18-year-long conflict.

SEE ALSO: ISIS And The Taliban Are Battling It Out For A Slice Of Eastern Afghanistan

WATCH NEXT: The Guy Who Reportedly Sent His Resume To ISIS