The area around Hastings was first settled by a military detachment sent from Fort Snelling to guard a blocked shipment of supplies in the winter of 1820. Lieutenant William G. Oliver camped in an area that came to be known as Oliver's Grove, and in 1833 a trading post was opened there. After the Treaty of Mendota of 1851 opened the area for white settlement, Oliver's Grove was surveyed and incorporated as a city in 1857, a year before Minnesota's admission to the union. The same year, Hastings was named the county seat of Dakota County. The name "Hastings" was drawn out of a hat from suggestions placed in it by several of the original founders.