Sacramento is the capital city of the U.S. state of California. The county seat of Sacramento County, it is located at the confluence of the Sacramento and American Rivers in the Sacramento Valley. It is the fourth-most populous city in Northern California, sixth-most populous city in the state, and 35th-most populous city in the United States, with a population of 524,943 at the 2020 census. The Sacramento metropolitan area, with 2.46 million residents, is the 27th-largest metropolitan area in the country.
Before the arrival of the Spanish, the area was inhabited by the Nisenan, Maidu, and other indigenous peoples of California. In 1808, Spanish cavalryman Gabriel Moraga surveyed and named the Río del Santísimo Sacramento (Most Holy Sacrament River), after the Blessed Sacrament. In 1839, Juan Bautista Alvarado, Mexican governor of Alta California, granted the responsibility of colonizing the Sacramento Valley to Swiss-born Mexican citizen John Augustus Sutter, who subsequently established Sutter's Fort and the settlement at the Rancho Nueva Helvetia. Following the American Conquest of California and the 1848 Treaty of Guadalupe-Hidalgo, the waterfront developed by Sutter began to be developed and incorporated in 1850 as the City of Sacramento. In 1852, the city offered its county courthouse to the state of California to house the state legislature, resulting in the city becoming the permanent state capital in 1854 and ushering in the construction of a new state capitol building which was finished in 1874.