In 1817, Andrew Jackson invaded Florida to hasten its annexation to the United States, in what became known as the First Seminole War. After Florida became a U.S. territory in 1821, conflicts between settlers and the Seminole increased as the former tried to acquire lands. The Second Seminole War lasted from 1835 to 1842, and afterward, the US forcibly removed about 3,000 Seminole and 800 Black Seminole to Indian Territory (now Oklahoma), west of the Mississippi River. Many others died in the war. Conflict broke out again in the Third Seminole War from 1855 to 1859, when a few hundred Seminole fought off US forces from the swamps of the Everglades. The US finally decided to leave them alone, as they could not dislodge them even after this protracted and expensive warfare.