Answer
In 1822, Alta California declared independence from Spain. This declaration was part of the Mexican War of Independence, which began in 1810 and resulted in Mexico gaining independence from Spain in 1821. Alta California was a province of New Spain, and its declaration of independence was a significant step in the formation of the Mexican nation.