The United States entered the War of 1812 at a disadvantage with a weak, unprepared military and few naval ships. While its goal was to conquer Canada, three separate invasions failed. In 1813, the Americans won some battles in Canada. As British troops fought in Canada, they invaded Washington D.C. and burned the city. They then moved to Baltimore but were repulsed. In 1815, British forces invaded New Orleans and were decisively defeated by Andrew Jackson, though the war had already ended due to slow communications. The Treaty of Ghent ended the war without territorial changes but the young nation gained new respect.