He was involved in the capture of Seine at the action of 30 June 1798 during which he was wounded, and took part in the July 1801 Battle of Algeciras as captain of the 74-gun HMS Pompee.
Stirling was recalled to England in late 1804, and on arrival was promoted to rear admiral and hoisted his flag in the 98-gun HMS Glory, which had been one of the famous ships involved in the Glorious First of June battle, and was now the flagship of the Rochefort squadron.
Shortly after the capture of Montevideo, Stirling was relieved and ordered to take up the office of naval Commander-in-Chief at the Cape of Good Hope Station.
[3] When war broke out with America, he was placed under the command of Admiral Sir John Borlase Warren in September 1812, and led his squadron in harassing American shipping and conducting coastal raids in the Bermuda area.
The specific charges were contained in a letter written by Commissioner Wolley at Jamaica, who claimed "that His Majesty's Naval Service had been brought into disrepute in consequence of it being spoken of publicly that ships of war were hired out to convoy vessels going to the Spanish Main."
Stirling appealed in July and won a number of concessions: a restoration to flag officer status and the right to continue to be addressed as "senior vice admiral of the white".