There was no immediate claim of responsibility for the blast, but ISIS militants have a long history of attacking the country’s Shiite Muslim minority.
Images from the scene Friday showed rescuers carrying a body wrapped in a blanket from the mosque, whose stairs at the entrance were covered in blood.
Taliban chief spokesman Zabihullah Mujahid said special forces responded to the scene and were investigating the incident.
The Taliban have been grappling with a growing threat from the local Islamic State affiliate, known as ISIS-K. The ISIS militants have ramped up attacks to target their rivals, including two deadly bombings in Kabul. The terror group also targeted Afghanistan’s religious minorities in attacks.