section_path: History/Mexican rule
section_name: Mexican rule
paragraph_text: Mexican rule
  
  New Spain achieved its independence from the Spanish Empire in 1821, and the pueblo now existed within the new Mexican Republic. During Mexican rule, Governor Pío Pico made Los Angeles the regional capital of Alta California. By this time, the new republic introduced more secularization acts within the Los Angeles region. In 1846, during the wider Mexican–American War, marines from the United States occupied the pueblo. This resulted in the siege of Los Angeles where 150 Mexican militias fought the occupiers which eventually surrendered.
  
  Mexican rule ended during following the American Conquest of California, part of the larger Mexican-American War. Americans took control from the Californios after a series of battles, culminating with the signing of the Treaty of Cahuenga on January 13, 1847. The Mexican Cession was formalized in the Treaty of Guadalupe Hidalgo in 1848, which ceded Los Angeles and the rest of Alta California to the United States.