The British navy controlled Chesapeake Bay and was generally successful with a blockade. Changing tactics in the late summer of 1814, British forces invaded Maryland, intending to bring an end to the conflict. American soldiers were routed at Bladensburg, a battle that President Madison witnessed. That ignominious defeat, only five miles from Washington, opened a clear path to the capital. Madison and the Congress scurried to safety in the countryside. On August 24, 1814, British soldiers set fire to the White House, the Capitol and other public buildings, exacting revenge for similar actions by American soldiers at York (Toronto) in April 1813. Before torching the presidential residence, British officers enjoyed a meal prepared for the Madisons. The British soldiers soon withdrew from Washington to concentrate on a more tempting target – Baltimore. The offensive, however, was halted in September 1814 by their failure to capture Fort McHenry, guardian of the city. This drama was memorialized in the National Anthem.