|The 15 Star Spangled Banner - click to enlarge|
The poem written in 1814 by Francis Scott Key, a Baltimore attorney and amateur poet while a "person in protective custody" about the HMS Surprise was finally adopted.
The poem was set to music using an old British song The Anacreontic Song, written by John Stafford in 1814.
The Star Spangled Banner was used from 1814 until it was officially adopted during some ceremony, and the Secretary of the Navy made it required while raising the Flag on July 27, 1889.
Other songs like America the Beautiful, Hail Columbia and My Country Tis of Thee were used by the civilian government before 1931. There was an amount of contention as to which song should be used - many didn't want the Star Spangled Banner because it's difficult to sing, but it was the final selection.
|The original poem - click to enlarge|
|1862 sheet music - enlarge|