In 1849, Salem was designated the county seat. The territorial capital was moved from Oregon City to Salem in 1852. The ensuing controversy over the location of the capital was settled in 1864 when Salem was confirmed as the state capital.