Gloucester served in Cuban waters in 1898 with the North Atlantic Fleet, Blockading Station. She participated in the Battle of Santiago de Cuba on 3 July against Cervera's fleet. While the main fleets were engaged Gloucester closed with the Spanish torpedo-boat destroyers Plutón and Furor driving them ashore as wrecks with her 6-pounder guns.[1] The victory came with no casualties, which was attributed to "The accuracy and rapidity of her fire, making the proper service of the guns on the Spanish ships impossible."
On 25 July, she entered the harbor before the fleet at Guánica, Puerto Rico, and captured the place for the U.S. Army in what is known as the Puerto Rican Campaign. The handling and fighting of Gloucester merited the commendation of the Navy Department. As the Army was anxious to transfer the place of disembarkation to the harbor of Ponce, the Fleet was directed to proceed to Ponce to reconnoiter; capture all lighters found there; and occupy such positions necessary for holding the port until the arrival of the Army. On 1 August, with assistance from Wasp, Gloucester took possession of Arroyo, and hoisting the U.S. flag, Wainwright held it until arrival of the Army, a day later.
Gloucester conducted harbor patrols at New York City until her name was struck from the Naval Vessel Register on 12 August 1919, and she was sold on 21 November.