California was admitted as a free state in 1850 under the Compromise of 1850. It never legalized slavery.