Francis Scott Key wrote the poem that became the lyrics of the United States national anthem after seeing Fort McHenry under bombardment.
Key was a lawyer who boarded a British vessel in September 1814 to negotiate the release of an American prisoner. He witnessed the British attack on Fort McHenry during the Battle of Baltimore in the War of 1812. Seeing the American flag still flying the next morning inspired his poem, originally titled “Defence of Fort M'Henry.”
The words were later set to the tune of “Anacreon in Heaven,” a British song associated with composer John Stafford Smith. The song gradually became popular at public ceremonies and military events before Congress officially designated it the national anthem on March 3, 1931.
A frequent mix-up identifies Stafford Smith as the lyricist. He composed the tune, while Key wrote the words. The anthem's historical setting is the War of 1812, decades before its official adoption.