In 1682, La Salle claimed for France all of the territory that drained into the Missisippi, which included present-day South Dakota. In 1762, France also gave to Spain its holdings west of the Missisippi, but in 1800, Napoleon forced the Spanish to return them. The French then sold them to the United States through the Louisiana Purchase of 1803. President Jefferson sent the Lewis and Clark Corps of Discovery to explore the newly acquired territory and in August 1804, the expedition camped near present-day Elk Point on its way to its winter camp at Fort Mandan in North Dakota. The expedition again crossed South Dakota in 1806 on their return trip. The Dakota territory was created by Congress in 1861 to include what would become North Dakota, South Dakota and parts of Montana and Wyoming. General George Custer led a military expedition into the Black Hills in 1874 and discovered gold near the present town of Custer. Even richer deposits were discovered in 1876, which led to a rush of prospectors into the area. Deadwood sprang up as a notoriously wild and lawless settlement. With population centers far apart, the residents of the northern and southern parts of the Dakota Territory requested separate administrations. Congress granted that wish in 1889, and later in that year, North Dakota and South Dakota were admitted to the Union as the 39th and 40th states.