Up to 5,000 angry mourners, including relatives of the dead, congregated near the site of yesterday's suicide bomb attack as IS claimed responsiblity for the latest atrocity targeting the minority community.
"Death to Daesh (IS)!" and "Down with fundamentalism", the demonstrators chanted, as the coffins were brought one by one and placed in a refrigerated lorry near the Jawadya mosque.
The mourners, who then marched to the cemetery to bury their dead, also demanded that the government bring the perpetrators to justice and pledged to "take revenge" if it did not.
It came a day after IS claimed a deadly assault on the Iraqi embassy in Kabul as it extends its footprint in the war-torn country.
More From This Section
Underscoring the nation's insecurity, a Taliban suicide bomber on Wednesday rammed a vehicle filled with explosives into a convoy of foreign forces in the restive southern province of Kandahar, killing two US soldiers.
Shiites, a minority of around three million in overwhelmingly Sunni Afghanistan, have regularly been targeted by IS jihadists over the last year. They accuse police and troops of failing to protect them.
Members of the Shiite community said police had fled their checkpost, around 100 metres from the mosque, after the two attackers struck at around 8:00 pm (1530 GMT) on Tuesday.
Angry locals then clashed with the police and set the checkpost on fire, according to witnesses who reported that officers opened fire, injuring some demonstrators.
The governor's spokesman said the police chief of the district had been suspended for "negligence" and a delegation from Kabul had been sent to investigate the attack.
Witnesses described scenes of terror and chaos, with emergency wards overwhelmed and survivors rushing victims to hospital in their own vehicles and even on foot.
"There weren't enough ambulances... I tried to take a small child to hospital but he died in my hands," Ali, who only gave one name, told AFP.
Farhad Afshar rushed to the mosque, where worshippers had gathered for prayers, after hearing the explosion.
"When I arrived the mosque was full of flesh and blood. I saw a mother crying and searching for her two children. She found one them wounded inside the mosque, the other was found dead in an ambulance," he told AFP.
IS has claimed responsibility for a series of attacks killing dozens of Shiites in Kabul over the past year, including twin explosions in July 2016 that ripped through crowds of Shiite Hazaras, killing at least 85 people and wounding more than 400.