The number of people who died differed, with a spokesman for Afghan police forces in northern Afghanistan saying four people died and 20 people were injured while the leader of Faryab province security said three people died and nine were injured, Khaama Press reported.
All of the dead and injured were civilians.
Provincial security chief Nabi Mullah Khel said the incident occurred in a hotel when explosives in a pressure cooker detonated.
Lal Mohammad Ahmadzai, spokesman for Afghan police forces in northern Afghanistan, said two people were in custody.
No one immediately claimed responsibility for the incident.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Man spent 15 hours in jail for plugging electric car into an outlet at a school