El Escorial Conspiracy

The El Escorial Conspiracy (Spanish: Conspiración-proceso de El Escorial) was an attempted coup d'état led by the Crown Prince Ferdinand that took place in 1807, but was quickly discovered and led to an investigation known as the Process of El Escorial.

Historical context
In the early nineteenth century, Spain was trapped politically by the First French Empire and the ambitious expansion plans of Napoleon Bonaparte. In 1801 Charles IV of Spain named Manuel Godoy as first secretary, in place of Pedro Cevallos, who distrusted and opposed the French. In 1805, Spain signed a mutual assistance treaty with the newly crowned French Emperor.

The treaty led to Spain's involvement in the War of the Third Coalition, with Spanish and French forces against the Portuguese and English, culminating in the English naval victory at the Battle of Trafalgar. This defeat made many enemies at court for Godoy, among them the son of Charles IV, Crown Prince Ferdinand (later King Ferdinand VII).

The Conspiracy
Having been kept out of government, Ferdinand joined with other plotters to reach out to Napoleon for assistance in his struggles against his father and Godoy. In October 1807, Ferdinand was arrested. He revealed his allies in the conspiracy and was pardoned. Ferdinand's allies were all tried in court and acquitted.

Aftermath
The pardon and acquittals of 1807 were granted because there was significant public support for the conspirators against Godoy, as demonstrated in the Tumult of Aranjuez a few months later, in which Godoy's palace was attacked, the king deposed and Ferdinand granted the throne by the Royal Council the next day.