The Tribunal of the Holy Office of the Inquisition, commonly known as the Spanish Inquisition, was a tribunal established in 1478 by Ferdinand II of Aragon and Isabella I of Castile, the King and Queen of Spain. It was intended to maintain Catholic orthodoxy in their kingdom, and to replace the medieval inquisition which was under Papal control. However behind this ostensible well-meaning goal the Inquisition was rife with corruption; sadistic fanatics, the Inquisitors were known for their unnecessary and extreme acts of violence towards non-Catholics, or even Catholics who dared to speak out against them.
The establishment of the Spanish Inquisition was authorized in 1478 by Pope Sixtus IV at the request of Ferdinand II of Aragon and Isabella I of Castile, the King and Queen of Spain, permitting them to appoint priests as inquisitors.
The first auto-da-fé (act of faith) was held in Seville in 1481, during which six people were burned alive. From there, the Inquisition grew rapidly in the Kingdom of Castile. In 1483, the Supreme Council of the Inquisition was established to supervise all tribunals. That year, all Jews were expelled from Andalusia and a new court was formed with a 30-day grace period for Jews to renounce their religion if they wished to remain. Torture was used to extract confessions from those suspecting of relapsing, and those found guilty of doing so were burned.
The first Inquisitor General was Tomás de Torquemada, who in 1491 was persuaded by Rodrigo Borgia to arrest a number of Spanish Assassins after giving him a list of supposed heretics. After Luis de Santángel requested his aid, the Italian Assassin Ezio Auditore da Firenze traveled to Spain to free his brothers and killed several Inquisitors, namely Gaspar Martínez, Pedro Llorente, and Juan de Marillo. However, Ezio spared Torquemada when he learned he was not a Templar, and had been manipulated by Rodrigo into arresting the Assassins. This unfortunately allowed Torquemada to continue his acts of cruelty as Inquisitor General.
By 1492, tribunals existed in eight Castilian cities. That year, the Alhambra Decree formally expelled all Jews from Spain. Tens of thousands were baptized in the three months before the deadline for expulsion. Around 40,000 left the country.
The Assassins eventually killed Torquemada in 1498, while Luis began poisoning Queen Isabella in an attempt to end the Inquisition, having learned that Cesare Borgia, with the Church's backing, had been threatening her to facilitate the Inquisition's spread into Portugal. The Italian Assassins sent by Ezio continued Luis' work following his death. Regardless, Manuel I of Portugal chose to allow the Inquisition into his country, and opted to banish the Jewish population. The Assassins helped many flee to Constantinople, and assisted those who could not to fight for themselves.
The ruler of the Ottoman Empire, Bayezid II, accepted the influx of refugees, knowing that the intellectuals among them would ultimately benefit his empire. Hoping to spread their influence and weaken the Ottoman Empire, the Templars hid saboteurs and dissidents in the crowds; however, this plan was thwarted by the Italian Assassins, who eliminated the Templar agents and ensured the refugees were welcomed.
In 1558, the Inquisition presided over trials against Lutheran groups and autos-da-fé were held, some presided over by members of the royal family. Over 100 executions took place, virtually putting an end to Spanish Protestantism. By 1562, more acts, such as disrespect to church images and eating meat on forbidden days, were deemed as heresy. Approximately a dozen Spaniards were burned alive for violating these acts.
In 1570, following an uprising of Moorish Muslims forcibly converted to Christianity, the Inquisition turned its attention to Islam. In 1609, King Philip III ordered the expulsion of the Moriscos and an estimated 300,000 (roughly 4% of the total Spanish population) were forced to leave the country. During this period, the Inquisition began burning people for offenses including witchcraft, blasphemy, bigamy and freemasonry.
By the 1720s, increasing numbers of licenses to possess and read prohibited texts were granted as new ideas poured into Spain and inquisitorial activity began winding down. Leading figures of the Spanish Enlightenment pushed for the abolition of the Inquisition and foreign Enlightenment texts proved popular among members of the nobility and government. In 1789, during the French Revolution, the Council of Castile, fearing that revolutionary ideas would penetrate Spain's borders, reactivated the Holy Office responsible for the persecution of French works. A new Inquisition edict was passed banning seditious French papers, but it did little to stem the material crossing the border. 
The Inquisition was first abolished when Napoleon's brother, Joseph, was made King of Spain in 1808. However, the Inquisition was reconstituted by Ferdinand VII when he was restored to the throne in 1814. The Spanish Inquisition was definitively abolished on 15 July, 1834 by a Royal Decree signed by Regent Maria Christina of the Two Sicilies, Ferdinand VII's liberal widow.