An official at Afghanistan's Interior Ministry earlier said at least eight policemen had been wounded.
Police officials told Reuters a suicide bomber detonated himself at the gate.
Many explosions were later heard from the area during the clearance operation by the Crisis Response Unit of the Afghan National Police, Tolo News reported.
Afghan President Ashraf Ghani also condemned the violence and said IS fighters have turned to attacking places of worship now that they've lost key military positions.
The jihadists of the group islamic State have claimed responsibility for the beginning of August the attack in full prayer of a shi'a mosque in Herat, during which at least 33 people had been killed.
Interior ministry spokesman, Najib Danish, told Al Jazeera that after a blast at the Imam Zaman mosque in the Qala-Najara neighborhood, three gunmen entered and began shooting.
Additionally, the BBC cited witnesses who said the gunmen had taken hostages.
The Daesh terrorist group claimed responsibility for the attack.
In June this year, another mosque was attacked where six people were killed and 10 wounded.
Durrani said the attack occurred overnight and the Taliban sustained heavy casualties.
There was no immediate word on casualties.
"Our relatives have been stranded inside the mosque".
He said at least 12 people were killed and 38 others were wounded in the attack.
"An assailant blew himself up and three others managed to enter the mosque".
Police cordoned off the area following the attack.
Elsewhere, provincial deputy police chief Nisar Ahmad Abdul Rahimzai saids that Afghan security forces recaptured a district in eastern Paktia province from the insurgents.
- Bacca juega 70' en derrota de Villarreal ante Real Sociedad
- COLOMBIA: Matej Mohoric ganó la séptima etapa de la Vuelta a España
- West Ham adelanta convocatoria de Chicharito en comunicado
- Want an iPhone 8? That'll Be $999
- Banfield vence a Belgrano en sur bonaerense
- Corea del Norte mostró nuevo misil intercontinental que alcanzaría todo Estados Unidos
- Los Lakers buscan más estrellas
- Ventana de transferencia de enero: Real Madrid y Barcelona
- David Villa named in Spain squad for first time in three years
- Ardusso encabezó la manada de "Toros" en Termas