Francis Scott Key wrote "Defence of Fort M'Henry" (later "The Star-Spangled Banner") aboard a British ship during the Battle of Baltimore — September 13–14, 1814. The British failed to capture Fort McHenry. The flag’s survival at "dawn's early light" inspired the lyrics.
The decisive British defeat came months later: Battle of New Orleans, January 8, 1815 — Andrew Jackson’s rout of Pakenham’s army. But the poem was born at Baltimore, where the British chose to withdraw after failing to silence the fort.
He was a lawyer negotiating a prisoner release — not a soldier. His "rockets' red glare" and "bombs bursting in air" were Congreve rockets and mortar shells from HMS Erebus, Meteor, Devastation, Aetna, Volcano. The "star-spangled banner" was Mary Pickersgill’s 15-star, 15-stripe garrison flag.
The British weren’t defeated at Fort McHenry — they were repulsed. The distinction matters: the flag survived. That’s the verse.