The blast occurred Thursday near a market in an Afghan town near the Pakistani border .