Merced (; Spanish for "Mercy") is a city in, and the county seat of, Merced County, California, United States, in the San Joaquin Valley. As of the 2020 census, the city had a population of 86,333, up from 78,958 in 2010. Incorporated on April 1, 1889, Merced is a charter city that operates under a council–manager government. It is named after the Merced River, which flows nearby. Merced, known as the "Gateway to Yosemite", is less than two hours by automobile from Yosemite National Park to the east and Monterey Bay, the Pacific Ocean, and multiple beaches to the west. The community is served by the passenger rail service Amtrak, a minor, heavily subsidized airline through Merced Regional Airport, and three bus lines. It is approximately 110 miles (180 km) from Sacramento, 130 miles (210 km) from San Francisco, 55 miles (89 km) from Fresno, and 270 miles (430 km) from Los Angeles. In 2005, the city became home to the 10th University of California campus, University of California, Merced (UC Merced), the first research university built in the U.S. in the 21st century.