Final answer:
The British attacked Baltimore in September 1814 during the War of 1812 through naval bombardment of Fort McHenry and a land assault.
Step-by-step explanation:
In September 1814, the British, under the command of Major General Robert Ross and Admiral Alexander Cochrane, launched an attack on the city of Baltimore. The attack on Baltimore was part of a larger campaign during the War of 1812, with the British military forces executing a two-pronged approach. On the naval side, Admiral Cochrane's fleet attacked Fort McHenry, which served as the primary defense of Baltimore's harbor. Their strategy was to bombard the fort continuously until its defenders capitulated. Despite a sustained assault lasting twenty-five hours, the British were unable to break through the American defenses.
Simultaneously, a land-based attack was planned. Ross personally led British troops, but was mortally wounded by American snipers. This loss, combined with strong resistance from American forces who utilized artillery and defensive works, led to the retreat of British forces back to their ships. Thus, both the naval and ground attacks by the British on Baltimore failed, and this event is historically significant as it inspired Francis Scott Key to write the poem that would become known as "The Star-Spangled Banner". The British defeat at Baltimore and their failed attempts at coercion were symbolic of the larger challenges faced by the British in the War of 1812, ultimately influencing the trajectory of the war.