Question: when did california become a territory of the united states
Answer: The area became a part of Mexico in 1821 following its successful war for independence but was ceded to the United States in 1848 after the Mexican -- American War .