where was the star spangled banner written

just now 1
Nature

The Star-Spangled Banner was written by Francis Scott Key during the British attack on Fort McHenry in Baltimore, Maryland. He wrote the lyrics on the morning of September 14, 1814, after witnessing the large American flag, known as the Star-Spangled Banner, still flying over the fort following the bombardment, which signaled American victory.

Key completed the poem in a Baltimore hotel after being released from brief detention on a British ship during the battle. The Fort McHenry flag that inspired the anthem was made in Baltimore in 1813 and flown over the fort during the battle.