On September 20, 1814, the "Star Spangled Banner" was published as a song in the Baltimore Patriot and The American (lyrics by Francis Scott Key, tune by John Stafford Smith). From the article:
"Key gave the poem to his brother-in-law Judge Joseph H. Nicholson who saw that the words fit the popular melody "The Anacreontic Song", by English composer John Stafford Smith. This was the official song of the Anacreontic Society, an 18th-century gentlemen's club of amateur musicians in London. Nicholson took the poem to a printer in Baltimore, who anonymously made the first known broadside printing on September 17; of these, two known copies survive.
On September 20, both the Baltimore Patriot and The American printed the song, with the note "Tune: Anacreon in Heaven". The song quickly became popular, with seventeen newspapers from Georgia to New Hampshire printing it. Soon after, Thomas Carr of the Carr Music Store in Baltimore published the words and music together under the title "The Star Spangled Banner", although it was originally called "Defence of Fort M'Henry". Thomas Carr's arrangement introduced the raised fourth which became the standard deviation from "The Anacreontic Song".[14] The song's popularity increased and its first public performance took place in October when Baltimore actor Ferdinand Durang sang it at Captain McCauley's tavern. Washington Irving, then editor of the Analectic Magazine in Philadelphia, reprinted the song in November 1814.
By the early 20th century, there were various versions of the song in popular use. Seeking a singular, standard version, President Woodrow Wilson tasked the U.S. Bureau of Education with providing that official version. In response, the Bureau enlisted the help of five musicians to agree upon an arrangement. Those musicians were Walter Damrosch, Will Earhart, Arnold J. Gantvoort, Oscar Sonneck and John Philip Sousa. The standardized version that was voted upon by these five musicians premiered at Carnegie Hall on December 5, 1917, in a program that included Edward Elgar's Carillon and Gabriel Pierné's The Children's Crusade. The concert was put on by the Oratorio Society of New York and conducted by Walter Damrosch.[15] An official handwritten version of the final votes of these five men has been found and shows all five men's votes tallied, measure by measure."