The gunnery officer of a warship was the officer responsible for operation and maintenance of the ship's guns and for safe storage of the ship's ammunition inventory.