The War of 1812 did not go well for the U.S. initially as they were unprepared and lost early battles against the British. By 1814, the British had burned Washington D.C. and launched a bombardment of Baltimore. Although the U.S. flag still flew over Fort McHenry after the attack, inspiring the national anthem, neither side achieved their war aims. The Treaty of Ghent in 1815 returned borders to their pre-war status quo without any territorial changes.