Afghan police said that an explosion outside a mosque in the western Afghan city of Herat killed 28 people, including a well-known pro-Taliban religious scholar, and wounded 45.

Herat police spokesman Mahmoud Rasouli stated that Mujibur Rahman Ansari, some of his bodyguards and civilians were killed on their way to the mosque.

Taliban spokesman Zabihullah Mujahid - in a tweet on Twitter - expressed his deep condolences for the killing of Ansari and said that his attackers would be punished.

Mujibur Rahman Ansari had vigorously defended the Taliban in a large gathering of thousands of scholars and sheikhs organized by the movement in late June, and denounced any opposition to its rule.

The Taliban say they have beefed up security in the country since taking power nearly a year ago, but several explosions have occurred in the past few months, some targeting crowded mosques during prayers.

The United Nations has raised concerns about an increasing number of attacks, and a local branch of the Islamic State group has claimed responsibility for some of the blasts.

No one has yet claimed responsibility for today's explosion.