KABUL, Afghanistan -- Gunmen in Afghanistan stormed a partially constructed building near an intelligence training center on Monday in western Kabul, triggering a gunbattle with security forces as detonations and shooting reverberated from the area. As the firefight unfolded, reinforcements were sent to the district, said Nasrat Rahimi, deputy spokesman for the Interior Ministry.

Rahimi confirmed to CBS News several hours later that the assault was over and that the three terrorists involved had been killed. He said only two members of the Afghan security forces were wounded in the attack, and their injuries were not life threatening.

"Initial reports indicate the gunmen are wearing police uniforms," Rahimi said earlier. The building where the attackers were shooting from and the nearby training center of the National Directorate of Security were surrounded by Afghan security forces.

Get Breaking News Delivered to Your Inbox

The attackers used rocket-propelled grenades and also light weapons.

The Afghan branch of the Islamic State of Iraq and Syria (ISIS) claimed responsibility for the attack.

ISIS has repeatedly targeted civilians and security forces in Afghanistan this year.

The Taliban insurgency has also attacked law enforcement -- and civilians -- across the country, but the group tends to target civilians less than ISIS.