A corregidor was a local, administrative and judicial position in Spain and its empire. He was the highest authority of a Corregimiento. In the Americas a corregidor was often called an alcalde mayor. They began to be appointed in fourteenth century Castile and the institution was definitively abolished in 1833. They were the representatives of the royal jurisdiction over a town and its district.
Development in Spain 
The idea of appointing crown officials to oversee local affairs was inspired by the late-medieval revival of Roman law. The goal was to create an administrative bureaucracy, which was uniformly trained in the Roman model. In spite of the opposition of council towns and the Cortes (Parliament), Castilian kings began to appoint direct representatives in towns during fourteenth century. They were also called jueces del salario or alcaldes veedores but the term corregidor prevailed. The word regidor often means town councillor in the Spanish language. Thus, co-regidor was the position intended to co-rule the town together with elected councillors.
The first monarch to make extensive use of corregidores was Alfonso X, who ascended to the throne at the age of eleven. In order to consolidate royal authority and reward the newer nobility and certain great magnates who supported him he greatly expanded the use of the office. Some bishops and local lords were given the right to appoint corregidores in their territories. Henry used them mostly in Andalusia, the Basque provinces and Galicia, areas where royal power was weakest. The definitive consolidation of the institution occurred during the reign of the Catholic Monarchs (1474–1516). Corregidores were crucial for the state building process that both monarchs ushered in. Their job was to collect taxes, to report to the crown on the state of affairs in the area, and to ensure that royal jurisdiction was not interfered with by members of the church or the nobility. From 1480 onward, they—and all subsequent Spanish monarchs—never again appointed a noble corregidor and instead relied exclusively on commoners with legal training to fill this office.
As representatives of the royal power, corregidores administered justice, both criminal and civil, in the first instance (or in appeal in districts with alcaldes ordinarios), presided over the town council and ruled a district called a corregimiento. They were audited and controlled through the juicio de residencia (a general audit and review at the end of their term in office) or by means of visitas (literally, 'visits'; more accurately, 'inspections'), which could occur at any point in their term in response to complaints. The corregimiento became the basic unit of state administration in early modern Spain.
After the War of Succession, the new Bourbon kings introduced them into the Aragonese territories, replacing the bailes and vegueres, who, nevertheless, had very similar functions to Castilian corregidores.
Introduction into the Americas and Philippines 
The institution was established also in Spanish America during the conquest, where it were also known by the names justicia mayor and alcalde mayor (not to be confused with the alcaldes ordinarios of the cabildo). In Indian areas the office was known as the corregidor de indios. Corregidores essentially had the same powers and duties as governors (gobernadores), except that whereas the latter ruled over a province-sized area (called variously a gobernación or a provincia), the corregidor administered a district-sized corregimiento. The corregidores were introduced in the mid-16th century to replace the encomiendas, which had become a source of autonomous power for the settlers. It was a decades-long process. The reformed Audiencia of New Spain began implementing them in the 1530s, but they were not successfully set up in the Viceroyalty of Peru until the administration of Toledo. As the encomiendas were phased out, corregidores oversaw most of the local repartimientos.
By law neither corregidores nor governors (nor viceroys, for that matter) could be persons who resided in the district in which they ruled. In theory they should have not developed ties to the locality in order for them to remain disinterested administrators and judges. For this reason they were also forbidden to marry in their district, although they could apply for exemptions from this restriction. In reality, however, they did become enmeshed into local society, especially through financial ties, since their pay was based on a proportion of local royal revenues, and this was often an insufficient amount to cover living costs, much less the costs incurred in traveling to America. Corregidores often invested in the local economy, received loans from locals, and could abuse the reparto de comercio monopoly they oversaw, which often lead to corruption.
Although nominally under the viceroys, the long distances from the viceregal, and even provincial capitals, meant that most corregidores acted independently. Since their office held both police power (as the main local administrative institution) and judicial power (as the court of first instance) in rural areas, corregidores were very powerful persons. Because most of the corregidores in the Americas were not legally trained, they were assisted by lawyers who served as their asesores, or "advisers." If their district were large enough to required it, they were further assisted by subordinate delegates, called tenientes (lieutenant corregidores). In municipal areas with a cabildo, corregidores were to work with the council—for example, they recorded the annual election of alcaldes ordinarios and other council officers—but they could not hear cases in the first instance, which was the duty of the alcaldes ordinarios. In these cases, corregidores functioned as the first court of appeals, instead.
See also 
- González Alonso, Benjamín: El corregidor castellano (1348-1808), Madrid: Instituto de Estudios Administrativos, 1970
- Lunenfeld, Marvin: Keepers of the City: The Corregidores of Isabella I of Castile (1474-1504), Cambridge University Press, 1987
- Haring, C. H. The Spanish Empire in America. New York: Oxford University Press, 1947, 128-134