Longman & Broderip edition: Subsequent history The song, through its bawdy lyrics, gained popularity in London and elsewhere beyond the Anacreontic Society. New lyrics were also fashioned for it, including several patriotic titles in the United States. The most popular of these at the time was Robert Treat Paine Jr.'s "Adams and Liberty" (1798). "The Star-Spangled Banner" Francis Scott Key wrote "Defence of Fort McHenry" during the War of 1812, while detained on a British ship during the night of 13 September 1814, as the British forces bombarded the American fort. Key specifically wrote the lyrics with this familiar patriotic tune in mind, just as he had done with an earlier set of his lyrics, "When the Warrior Returns", in which he had made similar use of "star-spangled banner" imagery in praise of Stephen Decatur. Later retitled "The Star-Spangled Banner", Key's lyrics, set to Stafford Smith's music, became a well-known and recognized patriotic song throughout the United States, and was officially designated as the U.S. national anthem on 3 March 1931. The setting of new lyrics to an existing tune is called a contrafactum. References Bibliography PDF link. External links Lyrics "The Star-Spangled Banner" UVa Library: Exhibits: Lift Every Voice: Patriotic Odes Media Soundfile (.mp3), John Townley on The Top Hits Of 1776 , performed by the Georgia Tech Glee Club 18th-century songs Drinking songs The Star-Spangled Banner