The Spanish established 21 missions in California from 1769 to 1823, starting with Mission San Diego de Alcalá and ending with Mission San Francisco Solano. The missions were built to spread Catholicism among the Native American population and to establish a Spanish presence in the region.