In 1522, after the Spanish conquest, soldiers associated with Pedro de Alvarado arrived, asking him for authorization to found a Spanish town here after discovering gold in a nearby river. Alvarado came here under orders of Hernán Cortés to establish the town, naming it Villa de San Luis. In 1531, nearby Yopes attacked it. The Spanish response was to attack the Yopes, killing most, and taking many of their young as slaves. The few that remained dispersed to Oaxaca and Central America down to Nicaragua.