predominant economic policy was an interventionist one, and the State also pursued policies aiming towards infrastructure development as well as the abolition of internal customs and the reduction of export tariffs. Projects of agricultural colonisation with new settlements took place in the south of Mainland Spain. Enlightenment ideas began to gain ground among some of the kingdom's elite and monarchy. Liberalism and nation state In 1793, Spain went to war against the revolutionary new French Republic as a member of the first Coalition. The subsequent War of the Pyrenees polarised the country in a reaction against the gallicised elites and following defeat in the field, peace was made with France in 1795 at the Peace of Basel in which Spain lost control over two-thirds of the island of Hispaniola. In 1807, a secret treaty between Napoleon and the unpopular prime minister led to a new declaration of war against Britain and Portugal. French troops entered the country to invade Portugal but instead occupied Spain's major fortresses. The Spanish king abdicated and a puppet kingdom satellite to the French Empire was installed with Napoleon's brother Joseph Bonaparte as king. The 2 May 1808 revolt was one of many uprisings across the country against the French occupation. These revolts marked the beginning of a devastating war of independence against the Napoleonic regime. Further military action by Spanish armies, guerrilla warfare and an Anglo-Portuguese allied army, combined with Napoleon's failure on the Russian front, led to the retreat of French imperial armies from the Iberian Peninsula in 1814, and the return of King Ferdinand VII. During the war, in 1810, a revolutionary body, the Cortes of Cádiz, was assembled to co-ordinate the effort against the Bonapartist regime and to prepare a constitution. It met as one body, and its members represented the entire Spanish empire. In 1812, a constitution for universal representation under a constitutional monarchy was declared, but after the fall of the Bonapartist regime, the Spanish king dismissed the Cortes Generales, set on ruling as an absolute monarch. The French occupation of Mainland Spain created an opportunity for overseas criollo elites who resented the privilege towards Peninsular elites and demanded retroversion of the sovereignty to the people. Starting in 1809 the American colonies began a series of revolutions and declared independence, leading to the Spanish American wars of independence that put an end to the metropole's grip over the Spanish Main.