 The river forms the boundary between Marion and Polk counties, and the city neighborhood of West Salem is in Polk County.Salem was founded in 1842, became the capital of the Oregon Territory in 1851, and was incorporated in 1857.Salem had a population of 174,365 in 2019, making it the second-largest city in the state after Portland.