A suicide and gun attack on a Shia mosque in the western city of Herat also wounded over 60 individuals, mostly thought to be worshippers. More than 1,700 civilians have been killed in attacks in Afghanistan so far this year.
A suicide attack on a Shia Muslim mosque in the western Afghan city of Herat killed at least 29 people and wounded over 64 on Tuesday, officials said.
Abdulhai Walizada, Herat police spokesman, said there appeared to be more than one attacker on Tuesday, with witnesses describing a suicide bomber who detonated explosives and at least one other, a gunman who threw grenades at worshippers.
"Two attackers entered the mosque and started shooting and throwing grenades at people," said Mohammad Adi, a worshipper at the mosque who was injured in the attack and taken to the hospital.
Herat Governor Mohammad Asif Rahimi said at least 29 people were killed and 64 wounded in the incident which came two months after an attack on a 12th century mosque known as the Jama Masjid in Herat, in which seven people died.
One estimate placed the death toll as high as 34, but this could not immediately be confirmed. At Herat Main Hospital, Dr Shehrzai confirmed 29 bodies were brought to the hospital.
TRT World's Bilal Sarwary has more.
No one immediately claimed responsibility for Tuesday's attack on Herat's Jawadia Mosque. But the Taliban, fighting to install strict Islamic law and drive foreign troops out of Afghanistan, denied any involvement.
Chaos after the carnage
Hospital authorities in Herat said that all the dead and wounded were worshipping in the mosque when a suicide bomber blew himself up. The attack took place in the middle of evening prayers when the mosque was packed with about 300 worshippers.
Walizada said it was around 8 pm (local time) when "a terrorist attack was carried out on a mosque in the third security district of Herat city".
"Based on our initial information two terrorists were involved one of them wearing a suicide vest, who detonated himself while the second one was armed with a rifle. They are both dead," he added.
Afghan interior ministry spokesman Najib Danish initially said that he thought it was a car bomb and tweeted that there was a possibility that it was an improvised explosive device.
Mehdi Hadid, a lawmaker from Herat, who went to the site soon after the explosion said that the scene was one of horrific carnage. He estimated at least 100 dead and wounded were scattered throughout the mosque.
Hadid said he rushed to the mosque after hearing about the explosion. He was told that the attacker first fired on the private guards outside the mosque before entering. When inside, he fired on the praying worshippers until his rifle jammed then he blew himself up.
Witnesses in the area reported hearing a second explosion about 10 minutes after the initial bomber detonated his explosives.
Anger erupts against the government
President Ashraf Ghani, whose government has been under mounting pressure because of deteriorating security across the country, condemned the bombing and called on religious scholars to "raise their voices against the terrorist attacks".
Residents were furious the police did not prevent the second explosion, although it is still not clear what caused it.
Dozens of locals, who are mostly Shias, attacked the police station pelting it with stones and setting it on fire, said Herat provincial governor Jalani Farhad.
On Monday, Daesh claimed the attack on the Iraq Embassy in the Afghan capital Kabul. Daesh warned Shias in Afghanistan that they are targets.
Afghanistan has traditionally been relatively free of the sectarian violence common in Iraq or Syria but militants from the local branch of Daesh have repeatedly attacked the mainly Shia Hazara minority in the past year.