What event inspired Francis Scott Key to write "The Star-Spangled Banner"?

the defeat of the British at Baltimore, Maryland

Andrew Jackson's victory at New Orleans

the British invasion of eastern Maine

The event that inspired Francis Scott Key to write "The Star-Spangled Banner" was the British invasion of Baltimore, Maryland. It specifically refers to the American defense of Fort McHenry during the War of 1812.