The first inhabitants of California were the American Indians, who were later followed by Spanish explorers and settlers. On September 28, 1542, Juan Rodríguez Cabrillo and his crew entered San Diego Bay, becoming the first Europeans to visit the region. The pressure for a settlement came from missionaries eager to convert Native Americans to Christianity, from the intrusion of Russian and British merchants, mainly in search of sea otter skins, and from the search for the Northwest Passage across the North American continent. In 1769, the Spanish viceroy sent land and sea expeditions from Baja California, and the Franciscan friar Junipero Serra established the first mission in San Diego. Gaspar de Portolá established an outpost in 1770 in Monterrey.
Colonization began after 1773 with the opening of a land supply route through the deserts of the southwest that was intended to link other Spanish settlements in what are now Arizona and New Mexico with the coast. Californians were allowed to trade with foreigners, and foreigners could also own land in the province once they had naturalized and converted to Catholicism. The Central Pacific Railroad, the Pacific end of the railroad, largely handled almost all of the cargo across the Sierra Nevada Mountains in Northern California. On January 12, 1847, the last significant body of Californians surrendered to U. S.
forces. Some 2,350 men from the California Column marched east through Arizona in 1862 to drive out Confederate forces from Arizona and New Mexico. The Constitution of 1849 guaranteed voting rights to all citizens of California declared legal voters by this Constitution, as well as all citizens of the United States who were residents of this state on election day. Thanks to vigorous lobbying by the Anti-Chinese Workers' Party, led by Denis Kearney (an immigrant from Ireland), Article XIX, Section 4 prohibited corporations from hiring Chinese culis and empowered all California cities and counties to completely expel Chinese people or limit where they could reside. After Misiones were established in Alta California after 1769, Spaniards treated Baja California and Alta California as a single administrative unit, part of the Viceroyalty of New Spain with Monterrey as their capital. Article IX encouraged education throughout the state and provided for a system of communal schools partially funded by the state and provided for the establishment of a university (University of California).By 1890s electric railroad construction had begun in California, and by 1900 several systems existed to service California's largest cities.
Before Europeans landed in North America, about a third of all natives of what is now the United States lived in what is now California. Prior to the Gold Rush there was almost no infrastructure in California except for a few small towns, secularized and abandoned missions, and some 500 large ranches owned by Californians who had mostly seized Mission's land and livestock. Much of the population in California that referred to themselves as Spanish in 18th and early 19th centuries was of mixed Spanish, African, and Native American descent. The first transcontinental railroad from Sacramento, California to Omaha Nebraska was completed on May 9 1869.