A fur-trading post was established (early 1800s) at the confluence of the Mississippi and Minnesota rivers in what is now the historic village of Mendota (6 mi/9.7 km SW of St. Paul), and Fort Snelling was built there. Traders, missionaries, and explorers were the first inhabitants; settlers came from the east after treaties with the Native Americans officially opened the area to farming and lumbering. By 1823 the landing at the head of navigation on the Mississippi was an important debarkation point and trading port. In 1841, Father Galtier established St. Paul Church, from which the city (platted along the river in 1846) took its name. St. Paul became territorial capital in 1849 and state capital when Minnesota was admitted to the Union in 1858. It was a booming river port and transportation center, especially after the arrival of the railroad in 1862. Later it became the center of the railroad empire of James J. Hill.