KABUL- An explosion at a Shi'ite mosque in the northern Afghan city of Mazar-e-Sharif on Thursday killed or wounded at least 20 people, a local Taliban commander said.

"A blast happened in 2nd district inside a Shi'ite mosque, more than 20 killed and injured," Mohammad Asif Wazeri, the spokesman for the Taliban commander in Mazar-e-Sharif told Reuters.

Zia Zendani, the spokesman for the provincial health authority, said around five people had been killed and more than 50 wounded in the blast.

The explosion came two days after blasts tore through a high school in a predominantly Shi'ite Hazara area in western Kabul, killing at least six people and wounding 11. The Shi'ite community, a religious minority in Afghanistan, is frequently targeted by Sunni militant groups, including Islamic State.

A resident of Mazar-e-Sharif said she was shopping with her sister in a nearby market when she heard a large explosion and saw smoke rising from the area around the mosque.

"The glass of the shops was broken and it was very crowded and everyone started to run," the woman, who declined to be named, said.

Afghanistan's Taliban rulers say they have secured the country since taking power in August, but international officials and analysts say the risk of a resurgence in militancy remains and the Islamic State militant group has claimed several attacks.

(Reporting by Kabul newsroom; Editing by Raissa Kasolowsky and Alex Richardson)