A new socio-economic stage began in the first decades of the 19th century. The Pericú population declined drastically, while Spanish immigrants, miners, merchants and sailors settled in the region.
Under these conditions, the mission’s purpose shifted toward agriculture and ranching. By 1824 the region began to function as a town council, and in 1830, by decree of Governor Mariano Monteverde, San José del Cabo changed from mission to town.
During the war between Mexico and the United States (1846–1848), the U.S. Navy invaded and raised its flag over Baja California soil. To defend the territory, the distinguished local figure Mauricio Castro Cota was chosen as political chief of Baja California.
In one clash, on the night of November 19, 1847 in San José del Cabo, a battle began led by Lieutenant José Antonio Mijares, Vicente Mejía and José Matías Moreno against a detachment commanded by Lieutenant Charles Heywood. In that fight in the town center, José Antonio Mijares was gravely wounded and died the next day.
In the second half of the 19th century, San José del Cabo consolidated progress and achieved the status of “villa”. Agriculture—through sugarcane industry and cattle ranching in particular—strengthened maritime trade and coastal shipping, leading to population growth and new social sectors.
During this period, local government implemented public services such as education, postal service, street lighting, security and sanitation.