 The territory was returned to France in 1800 and then sold to the United States as part of the Louisiana Purchase in 1803.In 1812, the Territory of Missouri was formed, containing all of the Louisiana Purchase except the modern state of Louisiana.To manage this expansive and sparsely populated territory, counties were formed.