As a result of the political upheavals caused by the Iberian Peninsular War of 1807-1814 and of the removal of Ferdinand VII from the Spanish throne in 1808, a western separatist rebellion emerged among the Cuban Creole aristocracy in 1809 and 1810. One of its leaders, Joaquín Infante, drafted Cuba's first constitution, declaring the island a sovereign state, presuming the rule of the country's wealthy, maintaining slavery as long as it was necessary for agriculture, establishing a social classification based on skin color and declaring Catholicism the official religion. This conspiracy also failed, and the main leaders were sentenced to prison and deported to Spain.