"The Star-Spangled Banner" lyrics by Francis Scott Key, September 1814, during the Battle of Baltimore (War of 1812 vs. Britain). Key watched the bombardment of Fort McHenry; the flag's survival inspired the poem.
Music: Adapted from "To Anacreon in Heaven" (John Stafford Smith, c. 1775), a British drinking song.
Official anthem: 1931 (Congressional resolution).
Civil War: 1861–1865—nearly 50 years later. No connection to the anthem's creation.