Alta California (English: Upper California) was a province and territory in the Viceroyalty of New Spain and later a territory and department in independent Mexico. The territory, created in 1804 out of the northern part of the former province of Las Californias, an area now comprising the modern state of California and other states to the east. Neither Spain nor Mexico ever colonized much beyond the southern and central coastal area, so effective control never extended much beyond Sonoma in the north or the California Coast Ranges in the west. Most of interior areas such as the Central Valley and the deserts of California remained in de facto possession of indigenous peoples until later in the Mexican era when more inland land grants were made, and especially after 1841 when overland immigrants from the United States began to settle inland areas.
Large areas east of the Sierra Nevada and San Gabriel mountains were claimed to be part of Alta California, but were never colonized. To the southeast, beyond the deserts and the Colorado River, lay the Spanish settlements in Arizona.
Alta California ceased to exist as an administrative division separate from Baja California in 1836, when the Siete Leyes constitutional reforms in Mexico re-established Las Californias as a unified department. The areas formerly comprising Alta California were ceded to the United States in the Treaty of Guadalupe Hidalgo that ended the Mexican–American War in 1848. Two years later, California joined the union as the 31st state. Other parts of Alta California became all or part of the later U.S. states of Arizona, Nevada, Utah, Colorado and Wyoming.