An internal investigation is underway after a police officer shot at a man who allegedly threatened neighbours with a replica gun.