The "Star-Spangled Banner" was originally penned in Baltimore Harbor in the aftermath of the Battle of Baltimore.
Francis Scott Key, a barrister from Washington, was negotiating the release of American prisoners from a British truce ship. He was inspired to compose "Defence of Fort M'Henry" after he observed Pickersgill's flag flying over Fort McHenry. Key gave his poem to Joseph H. Nicholson, his brother-in-law, who noticed that the words matched the well-known music "The Anacreontic Song," written by English composer John Stafford Smith.
The song was published on September 20 in The American and The Baltimore Patriot, along with the note, "Tune: Anacreon in Heaven." A total of seventeen newspapers from Georgia to New Hampshire published the song after it immediately gained popularity. The song was initially titled "Defence of Fort M'Henry," but Thomas Carr of the Carr Music Store in Baltimore published the words and music together shortly after under the name "The Star Spangled Banner." The raised fourth, which Thomas Carr's arrangement added, eventually became "The Anacreontic Song's" standard deviation. The song gained popularity, and Baltimore actor Ferdinand Durang sung it at Captain McCauley's Tavern for the first time in public in October. The song was republished in November 1814 by Washington Irving, who was the editor of the Analectic Magazine in Philadelphia at the time.