Salem /ˈseɪləm/ is the capital of the U.S. state of Oregon, and the county seat of Marion County. It is located in the center of the Willamette Valley alongside the Willamette River, which runs north through the city. 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 154,637 at the 2010 census, making it the third largest city in the state after Portland and Eugene. Salem is a little more than an hour driving distance away from Portland. Salem is the principal city of the Salem Metropolitan Statistical Area, a metropolitan area that covers Marion and Polk counties and had a combined population of 390,738 at the 2010 census. A 2013 estimate placed the metropolitan population at 400,408, the state's second largest.