No group immediately claimed responsibility. The blast followed several attacks, including one at a mosque in Kabul, in recent weeks, some of which have been claimed by the Sunni Muslim militants of Islamic State.
One Taliban official, speaking on condition of anonymity, said at least 28 people had been killed and dozens more wounded in Friday's blast.
The attacks have underscored security challenges for the Taliban, which took over the country in August and have since carried out operations against Islamic State cells in Kabul.
"This afternoon, an explosion took place in a mosque of our Shiite compatriots ... as a result of which a number of our compatriots were martyred and wounded," Taliban spokesman Zabihullah Mujahid said on Twitter.