After conquering the Aztecs and the Purépecha, the Spanish made incursions into Colima. The first incursion into the Colima area occurred under Juan Rodríguez de Villafuerte in 1522 but was defeated by the natives of the Tecomán Valley. Hernán Cortés then sent Gonzalo de Sandoval to defeat the Tecos, which he did at the Paso de Alima and the Palenque de Tecomán. Sandoval then established the first Spanish settlement in the Colima Valley called Caxitlán in 1523, making it the third oldest functioning city government in Mexico and the second municipality of western New Spain. In 1527, Francisco Cortés de San Buenaventura moved the Spanish settlement to its current located and changing the name to San Sebastián de Colima.