Yes. Because the Spanish colonies had once claimed California as it's territory the areas was apart of Mexico in 1821 but had won it's independence in 1848.
Source: The Spanish Empire then claimed it as part of Alta California in their New Spain colony.