A statement from the interior ministry said six people were killed and nine wounded. Police have not said what might have ignited the gunpowder.
At least three other people were pulled from the rubble of collapsed mud-brick buildings and put into waiting ambulances.
Police, soldiers and crying relatives used their hands and shovels to dig through the debris for more people feared trapped underneath.
Khali Abdul Wahid, a leader in the area, said there were 400 shops near the blast site, and at least 100 were destroyed or damaged.
A reporter said at least 25 shops were destroyed.
Most of the shops, selling ropes, construction material and gunpowder for hunting rifles were shut at the time of the blast at about 6:30am (0200 GMT) in a part of the city where many buildings are already ruined from years of conflict.
Khan said most of the injuries were caused by houses and shops collapsing in the explosion.
Mahmadullah, 22, was opening his shop when the blast occurred. Rescuers pulled him out alive but unconscious from the rubble. His father, Mohammad Ashim, had a cut to his nose and head.