Soon after the outbreak of war in 1846, United States forces invaded the Mexican province of Alta California. Seven months later, on January 13, 1847, representatives of both countries signed the Treaty of Cahuenga in the San Fernando Valley, ending the fighting. For three years thereafter, California remained under American martial law. During this period, our population exploded following the discovery of gold, giving impetus to the demand that California be admitted to the Union. In 1849, leaders from around the future state met in Monterey to draft the first constitution, which was approved on November 13 of that year by a vote of 12,064 to 811. Peter Burnett was elected governor, and in January, 1850, the State Legislature began its first two-year session.
As our lawmakers went about establishing the basic institutions of state governance, the United States Congress argued about whether to admit California to the Union as a slave or free state or as two separate states, one slave and one free. The issue was resolved by the famous Compromise of 1850, and on September 9th of that year California was admitted to the Union as the 31st state.