California's diverse geography ranges from the Pacific Coast in the west, to the Sierra Nevada mountains in the east – from the Redwood–Douglas-fir forests of the northwest, to the Mojave Desert areas in the southeast. The center of the state is dominated by Central Valley, a major agricultural area. California contains both the highest and lowest points in the contiguous United States (Mount Whitney and Death Valley), and has the third-longest coastline of all states (after Alaska and Florida). Earthquakes are a common occurrence due to the state's location along the Pacific Ring of Fire: about 37,000 are recorded annually.
The name California once referred to a large area of North America claimed by Spain that included much of modern-day Southwestern United States and the Baja California peninsula. Beginning in the late 18th century, the area known as Alta California, comprising the California territory north of the Baja Peninsula, was colonized by the Spanish Empire as part of New Spain. In 1821, Alta California became a part of Mexico following its successful war for independence. Shortly after the beginning of the Mexican-American War in 1846, a group of American settlers in Sonoma declared an independent California Republic in Alta California. Though its existence was short-lived, its flag became the precursor for California's current state flag. American victory in the war led to the Treaty of Guadalupe Hidalgo, in which Mexico ceded Alta California to the United States. Western areas of Alta California became the state of California, which was admitted as the 31st state on September 9, 1850.