Despite American efforts, as the British turned their attention away from Europe to the war effort against the US, British sea power asserted itself. Using this new source of strength, on August 18, 1814, a force of about 4,000 redcoats landed in the Chesapeake Bay area en route to Washington. The American General William Winder knew the British were in route to Washington, which could be approached from Maryland via one of two bridges. Winder burned one bridge and stationed men at the other to blow it up if the British approached. The British, seeing the telltale blaze of a night fire, figured that the bridge they wanted to use was destroyed and decided to ford the river at Bladensburg. Winder quickly ordered his men there, where they were quickly routed at the Battle of Bladensburg.
With Bladensburg lost, Washington was quickly evacuated. Fleeing Americans destroyed the Navy Yard, hoping to deprive the British of any armaments they might find there. When the British, having rested in the midday heat, finally entered the city, they found a city abandoned. The British looted and burned government buildings, including both the White House and the Capitol. British Major General Robert Ross saw to it, however, that private residences were spared.
President Madison and his cabinet fled, to set up a government-in-exile.
Washington ablaze, British Admiral Thomas Cochrane now planned an invasion of Baltimore. Baltimore, however, was committed to not falling as easily as Washington had, and the citizens of Baltimore formed a Committee of Vigilance and Safety to prepare for the British attack. The city unified command of its forces under Major General Samuel Smith. Although General Winder had rank in the situation, the defeated General of Bladensburg decided to waive his right and let Smith control Baltimore. Unlike the defeatist Winder, Smith worked tirelessly to prepare Baltimore for a strong defense. For instance, Smith managed to divert 5 big artillery guns intended for shipment to Washington to the defense of Fort McHenry, which protected Baltimore's harbor. On September 11, 1814, the British ships arrived in Baltimore during Sunday church services.
As the British infantry from Washington advanced on Baltimore, British Major General Robert Ross was killed by small-arms fire. With Ross dead, his forces stalled. Cochrane, sitting outside of Baltimore's harbor, grew impatient at the delay. At around 7 PM, he began the naval bombardment of Fort McHenry.
Under constant bombardment, American gunners found that their smaller guns didn't have sufficient range to hit the British ships. The guns and powder were ordered well inside the safety of the fort, where the gunners and materiel weathered the British attack. Having heard no shots from Fort McHenry, the British assumed the American had run out of ammunition and sailed in closer. Fort McHenry's guns suddenly opened fire, decimating Cochrane's fleet and forcing the British to retreat to Jamaica. There, Cochrane prepared to attack New Orleans.