The inquisition began as a legal procedure before it was an institution: inquisitio, the inquiry, in which a judge investigates on his own authority rather than waiting for an accuser. Gregory IX commissioned the first standing papal inquisitors in the 1230s, largely Dominicans, against the Cathar heresy of Languedoc in the aftermath of the Albigensian Crusade, and the medieval tribunals spread with the mendicant orders, armed with manuals such as Bernard Gui's and, from 1252, with papal authorisation of torture.
The Spanish Inquisition was a different creature: founded in 1478 at the request of Ferdinand and Isabella and answerable to the crown, it was aimed not at Protestants, who scarcely existed yet, but at conversos, Jews converted to Christianity whose sincerity the crown doubted. Under its first inquisitor general, Tomas de Torquemada, the tribunal's early decades were its bloodiest, entangled with the expulsion of Spain's Jews in 1492; the moriscos, converted Muslims, followed as its second great target. Its councils, the Suprema, its regional tribunals and its public autos de fe ran for three and a half centuries until final abolition in 1834, extending to Spanish America, while Portugal and Goa kept parallel tribunals.
Rome's own Congregation of the Holy Office, founded in 1542 against Protestantism, was the tribunal that burned Giordano Bruno in 1600 and tried Galileo in 1633, and its Index of Forbidden Books censored European thought until 1966.