Mexico gained its independence from Spain in 1821—in general (though the specifics were different) for much the same political and economic reasons our Thirteen Colonies declared their independence from England in 1776. The new Republic of Mexico acquired Spain’s former conquests extending from coastal California to the eastern border of Texas. Between 1822 and 1848—when the United States won California via the Treaty of Guadalupe Hidalgo—Mexico sequentially installed seventeen governors to rule the province. The original capital of California was at Monterey, established by Spain in 1770. California’s last Mexican governor, Pio Pico, briefly moved the capital to Los Angeles during his second term in 1845-1846.