The lyrics of the Star Spangled Banner  are from a poem written in 1814 by Francis Scott Key, during the Battle of Fort McHenry in the War of 1812. The tune is from the popular British song Anacreon in Heaven written by John Stafford Smith in the 1760s.

The Star-Spangled Banner was used by the U.S. Navy in 1889, by President Woodrow Wilson in 1916, and became the national anthem on March 3, 1931.