The War of 1812 was fought between the United States and Great Britain from 1812 to 1815. The resentment by the US towards Britain over maritime rights such as impressment led to the declaration of war from Congress. In 1814, the British captured and burned Washington, D.C. The war ended on paper on 24 December 1814 with the Treaty of Ghent, but fighting continued into 1815 as it took months for the news to reach America. The Treaty of Ghent returned all territory to their prewar borders and ended the longtime American goal of conquering Canada.