Was California a territory before it became state?

Yes, California was a territory of the United States before it became a state. California became a U.S. territory on September 9, 1850, after the Mexican-American War, and became the 31st U.S. state on September 9, 1850, after the California Statehood Act was signed into law by President Millard Fillmore.
Copyright Wanderlust World © https://www.ynyoo.com