Many people think The Star-Spangled Banner by Francis Scott Key was written during the American Revolution, but it was not. The Star-Spangled Banner was written during the War of 1812. In August 1814, the British army took Francis’ friend Dr. William Beanes on board their ship as a prisoner of war. On September 13, 1814, Francis went on board to negotiate for his friend’s freedom, but the British kept him all day and over night while they attacked Fort McHenry. Francis had to watch the attack that night, and in the morning he was surprised to see the flag still flying! So that day he wrote, The Star-Spangled Banner. Amazingly, The Star-Spangled Banner did not become the national anthem of the United States of America until March 3, 1931.