Answer:
The War of 1812.
Step-by-step explanation:
Francis Scott Key was inspired to write "The Star-Spangled Banner" by witnessing the British bombarding the Maryland fort during the War of 1812. Key saw a lone U.S. flag still flying over Fort McHenry. As reflected in the lyrics of the anthem: "And the rocket’s red glare, the bombs bursting in air, Gave proof through the night that our flag was still there."
At first, it was conceived as a poem that was later published in newspapers and then set to the music of a popular English song called "To Anacreon in Heaven", composed by John Stafford Smith. After president Woodrow Wilson said it should be played at all official events in 1916, it was finally adopted as the national anthem on March 3, 1931.