California was settled by SPAIN in 1769. The Mexicans ruled California from 1822 to 1848, less than 30 years.
It was more like a separate colony than a part of Mexico.
Numerous English colonies had competing claims for most of it, and the Russians held the territory from San Francisco to the North.