The Saint Charles District became a part of the Louisiana Territory in 1805 with the Louisiana purchase. Before that it was a part of the Spanish Louisiana Territory, owned by Spain. Then the Saint Charles district became a county in 1812 when Missouri became a territory.