Francis Scott Key was born on August 1, 1779 in what was then Fredrick County Maryland. Keys was eventually appointed US attorney for the District of Columbia.
On June 18, 1812, after a series of disagreements over trade, America declared war on Great Britain. In August 1814, the British invaded Washington, DC. While in DC, the British burned down the White House, Capitol Building, and the Library of Congress.
Next, the British moved to Baltimore, Maryland. After Dr. William Beans, a friend of Keys, was taken prisoner, Keys went To Baltimore. He arranged for Beans release; however, the British wouldn’t let Keys and Beans go until the completion of the battle of Fort McHenry.
When the British lost the battle, Keys was so relieved to see the American flag still flying that he began writing what would become the Star-Spangled-Banner.
The poem was eventually reprinted in newspapers and set to the music of a popular English drinking tune called To Anacreon in Heaven.
An edited version of the Star-Spangled-Banner became our National Anthem on March 3, 1931.
Here is the entire text of Keys’s poem.