The region was part of Spanish Louisiana from 1762 to 1802. The portion of the state east of the Mississippi River became part of the United States at the end of the American Revolutionary War, when the Second Treaty of Paris was signed. Land west of the Mississippi was acquired with the Louisiana Purchase, though part of the Red River Valley was disputed until the Treaty of 1818. In 1805 Zebulon Pike bargained with Native Americans to acquire land at the confluence of the Minnesota and Mississippi rivers to create a military reservation. The construction of Fort Snelling followed between 1819 and 1825. Its soldiers built a grist mill and a sawmill at Saint Anthony Falls. They were harbingers of the water-powered industries around which Minneapolis later grew. Meanwhile, squatters, government officials, and others had settled near the fort. In 1839 the army forced them off military lands. They moved downriver to the area that became St. Paul just outside the military reservation. From 1812 to 1821 Minnesota was part of the Territory of Missouri. From 1821 to 1834 it was part of an Unorganized Territory. From 1834 to 1836 Minnesota, Wisconsin, Iowa and half the Dakotas were part of the Territory of Michigan. From 1836 to 1848 Minnesota and Iowa were part of the Territory of Wisconsin. From 1838 to 1846 Minnesota west of the Mississippi River was part of the Territory of Iowa. Minnesota east of the Mississippi was part of Wisconsin until 1848. When Iowa gained statehood western Minnesota was in an Unorganized Territory again. Minnesota Territory was formed on March 3, 1849. The first territorial legislature, held on September 2, 1849, was dominated by men of New England ancestry. Thousands of pioneers had come to create farms and cut timber. Minnesota became the 32nd U.S. state on May 11, 1858. The founding population was so overwhelmingly of New England origins that the state was dubbed "the New England of the West".