The decline culminated in a controversy over succession to the throne which consumed the first years of the 18th century. The War of the Spanish Succession was a wide-ranging international conflict combined with a civil war, and was to cost the kingdom its European possessions and its position as one of the leading powers on the Continent. During this war, a new dynasty originating in France, the Bourbons, was installed. Long united only by the Crown, a true Spanish state was established when the first Bourbon king, Philip V, united the crowns of Castile and Aragon into a single state, abolishing many of the old regional privileges and laws.
The 18th century saw a gradual recovery and an increase in prosperity through much of the empire. The new Bourbon monarchy drew on the French system of modernizing the administration and the economy. Enlightenment ideas began to gain ground among some of the kingdom’s elite and monarchy. Bourbon reformers created formal disciplined militias across the Atlantic. Spain needed every hand it could take during the seemingly endless wars of the eighteenth century—the Spanish War of Succession or Queen Anne’s War (1702–13), the War of Jenkins’ Ear (1739–42) which became the War of the Austrian Succession (1740–48), the Seven Years’ War (1756–63) and the Anglo-Spanish War (1779–83)—and its new disciplined militias served around the Atlantic as needed.
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 polarized the country in a reaction against the Gallicized 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. The Prime Minister, Manuel Godoy, then ensured that Spain allied herself with France in the brief War of the Third Coalition which ended with the British naval victory at the Battle of Trafalgar in 1805. In 1807, a secret treaty between Napoleon and the unpopular prime minister led to a new declaration of war against Britain and Portugal. Napoleon’s troops entered the country to invade Portugal but instead occupied Spain’s major fortresses. The Spanish king abdicated in favor of Napoleon’s brother, Joseph Bonaparte.
Joseph Bonaparte was seen as a puppet monarch and was regarded with scorn by the Spanish. The 2 May 1808 revolt was one of many nationalist uprisings across the country against the Bonapartist regime. These revolts marked the beginning of a devastating war of independence against the Napoleonic regime.
Napoleon was forced to intervene personally, defeating several Spanish armies and forcing a British army to retreat. However, further military action by Spanish armies, guerrillas and Wellington’s British-Portuguese forces, combined with Napoleon’s disastrous invasion of Russia, led to the ousting of the French imperial armies from Spain in 1814, and the return of King Ferdinand VII.