The first European exploration of what is now California was by the Spaniard Juan Rodriguez Cabrillo, who visited what would be San Diego Bay. British explorers included Sir Francis Drake in 1579. The Spanish established Catholic missions from San Diego to San Francisco. The territory became part of Mexico after the Mexicans overthrew Spanish rule in 1823. Mexico lost it to the United States as a result of its 1846-1848 war with the United States.
Richard Henry Dana published Two Years Before the Mast in 1840, as an account of his voyage to California starting in 1834. The book gave many Eastern Americans their first knowledge of this part of the West Coast. The first substantial group of immigrants attempting to reach the western territories overland set out in May of 1841. Their leaders, John Bidwell and Joh Bartleson, were farmers without experience in western travel. The group was fortunate to encounter mountain men who guided them west from Missouri. At Fort Hall, some continued towards Oregon while the remainder headed towards the Sierra Nevada. They crossed Walker Pass and sighted the San Joaquin Valley on October 29, 1841. The first to reach California, they were followed by many more. California suddenly became important with the discovery of gold. Within a few years, thousands of miners flooded into the state. The state adopted a constitution in 1849 forbidding slavery and was admitted to the Union under the Compromise of 1850. As in other "free" states, blacks continued to suffer discrimination. During the latter part of the 19th century, legislation was enacted to restrict Chinese immigration and in the first part of the next century, anti-Japanese laws were passed.
California's growth in both population and economic strength has been nearly unbroken since it became a state. Agriculture flourished on a large scale in the Central Valley. World War II resulted in a great expansion of defense industries, and California has remained a leader in high-tech defense and civilian industries.
Since World War II, California has often led the nation in social trends. Los Angeles was the movie capital before the war and has retained that position while becoming an influential center for television as well. San Francisco became the home for beatniks in the 1950s and hippies in the 1960s. Student rebelliousness first reached the headlines through the Free Speech Movement at Berkeley. Both Richard Nixon and Ronald Reagan reached the presidency after first winning public office in California.
The federal census of 1970 confirmed that California had replaced New York as America's most populous state.