There is no claim of responsibility in the latest attack that follows a string of assaults, mostly carried out by the Taliban, across Afghanistan since Friday, killing hundreds of people, including civilians and security personnel.
Gunmen attacked an area around a security base and training centre for Afghanistan's intelligence service on Thursday in the capital Kabul, officials said.
Staff and officials at the centre took shelter in a protected area of the compound as gunfire came from a half-finished building near the site.
Kabul police spokesman Hashmat Stanekzai said the attackers were firing rocket-propelled grenades and other weapons but it was unclear how many gunmen were involved.
TRT World's Sultan Faizy brings the latest from Kabul.
Gunfire and explosion
The area around the site was closed off but media reported that gunfire and at least one explosion could be heard.
There was no initial word on any casualties or claim of responsibility.
Military and intelligence facilities in Kabul have been regularly targeted by insurgents.
On Wednesday, at least 34 people were killed and 56 more wounded when a suicide bomber blew himself up at an education centre in the capital.
Daesh on Thursday said one of its militants was responsible for the attack, the group's Amaq news agency said on Thursday without providing proof.
Amaq said the attacker was wearing a suicide vest.
The latest incident comes at a time of high tension following a series of attacks including a full-scale assault on the city of Ghazni last week.