Pakistani officials say an accidental blast has killed five militants near the Afghan border , but residents dispute their account .