Once Napoleon was defeated in 1814, France and Britain became allies and Britain ended the trade restrictions and the impressment of American sailors. Running out of reasons for war and stuck in a military stalemate, the two countries signed the Treaty of Ghent on December 24, 1814. News of the peace treaty took two months to reach the U.S., during which fighting continued. In this interim, the British made one last major invasion, attempting to capture New Orleans, but were decisively defeated with very heavy losses by General Andrew Jackson at the Battle of New Orleans in January 1815. The ending of the war opened a long era of peaceful relations between the United States and the British Empire.