This article is from the Sacramento FAQ, by David F. Prenatt, Jr. with numerous contributions by others.
The discovery of gold at Sutter's Mill in 1848 (days after the signing
of the Treaty of Guadalupe Hidalgo that ended the Mexican war)
triggered a large westward migration to California that was centered
in Sacramento, during which the 49ers overran, plundered, and
destroyed Sutter's property. Meanwhile, the aboriginal population of
Sacramento disappeared virtually overnight, succumbing to the totally
exotic forces of alcohol, disease, and hostile white emigrants. In
1849 the California Constitution was adopted, and in 1850 California
became the 31st state (prompted in large part by the Gold Rush).
The Gold Rush is arguably the most important event during the
history of 19th Century America, rivaled only by the Civil War. In
fact, many would say that California's admission to the Union as a
free state under the Compromise of 1850 (prompted by the Gold Rush)
set into motion a series of events that culminated in the Civil War.
And as far removed as the state was from the action, California helped
finance a large part of the victorious Union forces.