The history of St. Louis, Missouri began with the settlement of the St. Louis area by Native American mound builders who lived as part of the Mississippian culture from the 9th century to the 15th century, followed by other migrating tribal groups. Starting in the late 17th century, French explorers arrived. Spain took over in 1763 and a trading company led by Pierre Laclede and Auguste Chouteau established the settlement of St. Louis in February 1764. It attracted French settlers leaving Illinois when Britain took control east of the Mississippi. The city grew in population due to its location as a trading post on the Mississippi River, as the western fur trade was lucrative. The city played a small role in the American Revolutionary War and became part of the U.S. through the Louisiana Purchase in 1803.
With its connection through the Ohio River to the east, the Mississippi to the south and north, and the Missouri to the west, St. Louis was ideally located to become the main base of interregional trade. In the 1840s, it became a destination for massive immigration by Irish and Germans. Some native-born Americans reacted with fear to the newcomers, adopting nativist sentiments. Missouri was a slave state, but the city's proximity to free states caused it to become a center for the filing of freedom suits. Many slaves gained freedom through such suits in the antebellum years. But, by the 1850s and the Dred Scott case, interpretations had changed and the US Supreme Court ruled against him. It also ruled that the Missouri Compromise was unconstitutional, contributing to the tensions causing the American Civil War. During the War, St. Louis had a small skirmish on its outskirts, but was held under Union control.