The Inquisition was an ecclesiastical institution of the Catholic Church which, through a Tribunal, controlled heresies or any doctrine contrary to Catholic orthodoxy. The origins of the Inquisition date back to the medieval period, between the end of the 12th century and the beginning of the 13th. As early as 1231-35, Pope Gregory IX established Inquisition Tribunals in various European cities, and in 1235 he entrusted the Inquisition to the Dominican Order. The medieval Inquisition evolved into the Spanish Inquisition in the 15th century, which was particularly repressive and cruel, and in 1542 Holy Office’s Congregation for the Doctrine of the Faith was founded. In the 19th century, European states abolished the Inquisition Tribunals, which was retained in the Vatican State, radically changing the original approach.