Among those killed was the imam leading Friday prayers at the mosque on the second day of the Muslim festival of Eid al-Fitr. More than a dozen people were injured, police said.
The explosion breaks a rare respite from violence that was being cautiously enjoyed by Afghans as part of a three-day truce, which began on Thursday between Taliban militants and Afghan forces, after weeks of intense fighting.
“The death toll has jumped to 12 killed including the imam of the mosque and 15 others are wounded,” said Ferdaws Framurz, a spokesman for Kabul police, updating an earlier toll.
No group has so far claimed the attack and the Taliban denied responsibility. Afghan officials regularly blame such blasts on the militant group who in turn insist they are fighting the Afghan military and not attacking civilians.
The blast is the first major incident since the temporary truce between the Taliban and government troops came into force.
The warring sides agreed on the truce to mark the Muslim holiday of Eid al-Fitr, only the fourth such halt in fighting in the nearly two-decades old conflict.
Deadly violence has rocked the country in recent weeks after the US military began formally withdrawing its remaining 2,500 troops from Afghanistan on 1 May.
Last week, a series of blasts outside a girls’ school in the capital killed more than 50 people, most of them teenage girls.
Families of victims were still in shock after the deaths of their loved ones.
“We were waiting for them to come home (from school),” said Rahima, whose two daughters were killed in the school blasts.
“They had left the house together and later their bodies came together,” she said as dozens of relatives offered condolences to her family on Thursday.
Officials blamed the Taliban who denied they were involved.