The Spanish Inquisition was founded in 1478 by Ferdinand and Isabella to maintain Catholic orthodoxy in their kingdoms and was under the direct control of the Spanish monarchy. It was not definitively abolished until 1834, during the reign of Isabella II.
https://www.newworldencyclopedia.org/entry/Spanish_Inquisition