With the signing of the Treaty of Cordoba in 1821, Mexico gained its independence from Spain, but the San Gabriel Mission near what is now Los Angeles, California, continued to expand, and established Rancho San Gorgonio in 1824. The ranch was to be one of the Mission's principle "rancherias", and the most distant, and it occupied most of today's San Gorgonio Pass area.