There's an explosion? That's really specific. Is it a mine or grenade going off?
Also, if you let the explosion go off, leave the area, pay any bounty off (I'm presuming you're getting a bounty if NPCs are suddenly attacking you), waiting a few in-game days, and return, are they still hostile?