This is a list of the governors of Upper California before it became a US state . Alta California was a colony of Spain since 1769 . After 1822, California came under Mexican supervision, which began a period of many insurrections. When the war between Mexico and the United States broke out in 1846, California declared itself an independent republic. The Republic of California became a protectorate of the United States until it became the 31st state of the United States on September 9, 1850.