Afghan girls grieve as they attend the burial of a family member August 16, 2018, a day after a suicide attack that targeted a Shiite educational training center in the Kabul.
At least two gunmen were killed in the attack.
No group immediately claimed responsibility for the attack but Jawad Ghawari, a member of the city's Shiite clerical council, blamed IS, which has carried similar attacks on Shiites in the past, hitting mosques, schools and cultural centers.
There was no immediate word of a claim of responsibility, but Taliban spokesman Zabiullah Mojahid denied that the group was to blame.
Afghan police said a suicide bomber walked into the education centre and detonated his explosive belt.
The blast killed at least 48 and wounded at least 67, the wire service writes, and came after weeks of "relative calm" in Afghanistan's capital.
The United States has reportedly killed over 220 Taliban fighters over the past five days, in response to their attempts to overrun Ghazni last week.
Wednesday's attack on the education centre took place at about 16:00 local time (11:30 GMT). One witness told Reuters that the scene at the educational center was "horrific".
Hossain recounted to The Associated Press how when he entered Fareba's classroom, he saw parts of human bodies all over student desks and benches.
NASAs Parker Solar Probe lifts off successfully
The mission is named for Eugene Parker , the physicist who first theorized the existence of the solar wind in 1958. The U.S space agency Sunday launched a probe that aims to travel closer to the sun than ever before.
The Shia community in Afghanistan has been repeatedly targeted by Sunni Muslim extremists of the Islamic State group, which views the Shia practice of Islam as heretical.
The Taliban hung on in Ghazni for almost five days before USA -backed Afghan forces flushed them out in what were some of the fiercest battles with the insurgents in recent months that killed scores of Afghan troops and civilians.
The attack comes after a bloody week in Afghanistan.
Ashraf Ghani, Afghanistan's president, has visited the embattled southeastern city of Ghazni, a week after the Taliban launched an attack and infiltrated deep into the key provincial capital.
Kabul police spokesman Hashmat Stanekzai said the attackers had fired rocket-propelled grenades as well as automatic rifles, and that security forces had held back from assaulting the building where the gunmen had taken position.
Elsewhere in Afghanistan, the Taliban attacked a police checkpoint in the southern Zabul province early Wednesday, killing four policemen, according to the provincial police chief, Mustafa Mayar.
Two days prior, on Monday, the Taliban overran the Camp Chinaya military base, located in northern Faryab province, killing 17 soldiers and wounding 19 others.
The Taliban, who launched their Ghazni assault last Friday and battled Afghan forces backed by US air strikes in the middle of the city for days, said their fighters had been pulled out to prevent further harm to the city's population.