Afghan policemen stand guard at the site of a suicide bomb attack near a Shiite mosque in Kabul on Sept. 29, 2017. (Noorullah Shirzada/AFP/Getty Images)

Dozens of worshipers were killed Friday when suicide bombers struck two mosques in an escalation of violence in Afghanistan this week that has left at least 150 people dead.

A suicide bomber detonated explosives inside a Shiite mosque on the southwestern fringe of the capital, killing 39 people — among them women and children — on a day in Afghanistan reserved for prayer and reflection.

In addition, 45 people were wounded in the attack, which took place during evening prayers inside the Imam Zaman Mosque in the city's Dasht-e-Barchi neighborhood, an enclave of ethnic ­Hazaras. Some were transported to a nearby hospital in critical condition, officials said.

"It was a gruesome scene," an eyewitness who identified himself as Ramazan Ali told a local television station. "Everyone was running away."

In central Ghowr province, a suicide bomber attacked worshipers in a Sunni mosque, where a former Taliban commander who was inside was apparently the target, a local official said. Twenty people, including the former Taliban commander, died in the afternoon attack, local officials said.

The bombings were the latest in a string of attacks this week that have killed an estimated 150 people in various Afghan provinces. Most of the attacks have targeted police compounds or military facilities. In addition, several attempted suicide bombings in Kabul have been foiled.

The mosque attacks came a day after the end of the holy month of Muharram. The Kabul attack marks the sixth on a Shiite mosque this year, including one in Herat province in August that killed 31.

Local news reports showed protesters gathered outside the Imam Zaman Mosque after the attack chanting "Death to ISIS," a reference to the Islamic State terrorist group that has claimed responsibility for previous bombings on Shiite mosques.