In the colonial era, Huanta province was larger than it is currently, with traditional ties to the central sierra of Peru, and largely indigenous. The province's capital, also called Huanta, was the site of an ecclesiastical "doctrina" and the center of a civil administrative district, "corregimiento". In a royal census of 1795, Huanta province had 27,337 inhabitants, of which 10,080 (36%) were mixed-race mestizos. Huanta was the site of a major rebellion (1825–28) against the newly-formed Peruvian state. The Huanta Rebellion, led by , is characterized as a monarchist rebellion. It brought together different ethnic and occupational groups in complex interactions. The peasants of Huanta, called Iquichanos, were monarchist rebels and were transformed into liberal guerrillas. They allied with Spanish officers and merchants, mestizo land owners, and priests to attack the Peruvian republic in the name of the Spanish king Ferdinand VII. It was led by , an illiterate "arriero" or muleteer, an occupation that brought him into contact with areas outside his home base, since mules were the primary means of hauling freight and trade goods in the colonial era. The Huanta rebellion was defeated militarily, but the local leaders did not suffer the severe repression that characterized earlier rebellions, most notably the Rebellion of Túpac Amaru II.