
Navy regulations for 1818 were the first to prescribe a specific manner for rendering gun salutes (although gun salutes were in use before the regulations were written down). The first official salute by a foreign nation to the Stars and Stripes took place on 14 February 1778, when the Continental Navy ship Ranger, Captain John Paul Jones, fired 13 guns and received 9 in return from the French fleet anchored in Quiberon Bay, France. Rather, it was the Grand Union flag, consisting of thirteen alternating red and white stripes with the British Jack in the union. The flag flown by the Andrew Doria and the unnamed American schooner in 1776 was not the Stars and Stripes, which had not yet been adopted.

About three weeks before, however, an American schooner had had her colors saluted at the Danish island of St. This has been called the "first salute" to the American flag. At the time, a 13 gun salute would have represented the 13 newly-formed United States the customary salute rendered to a republic at that time was 9 guns. A few minutes later, the salute was returned by 9 (or 11) guns by order of the Dutch governor of the island. Eustatius in the West Indies (some accounts give 11 as the number).

On 16 November 1776, the Continental Navy brigantine Andrew Doria, Captain Isaiah Robinson, fired a salute of 13 guns on entering the harbor of St. Several famous incidents involving gun salutes took place during the American Revolution. By 1730, the Royal Navy was prescribing 21 guns for certain anniversary dates, although this was not mandatory as a salute to the Royal family until later in the eighteenth century. For many years, the number of guns fired for various purposes differed from country to country.
