Prior to the westerner's discovery of gold California was a territory of Mexico and before it Spain. The year gold was discovered, 1848, marked the same year that ended the Mexican-American War, a mere 27 years after Mexico's fight for independence from Spain. The change to a newly formed Mexican government in 1821 led to instability throughout Mexico and especially its northern reaches such as Texas and Alta California. This instability and the continued American expansion of Manifest Destiny led to conflict and the 1836 Texas Revolution. For the next decade the political sovereignty of Texas was under extreme debate between Mexico and the U.S. The non-compromised annexation of 1845 incorporated Texas as an official U.S. state and prompted open war between the two countries. The American victory in 1848 resulted in the treaty of Guadalupe Hidalgo and a large land acquisition including Alta California.
The lack of government enforcement, the rapidly increasing number of miners, and the seemingly unbridled economic gain forced the United States into quick action and to forego the usual process of new land first becoming a formal territory. Instead, on September 9th 1850 California was granted full statehood becoming the 31st state of the union. Along with its initial incorporation much of its settlement and character was to be equally influenced by the continuing, and now officially, California Gold Rush.