At least 20 people were killed in an explosion at a Shiite mosque in the city of Herath in Afghanistan.