City police, who are handling the investigation, were not immediately available to explain how the gun went off.