This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (June 2013) ( Learn how and when to remove this template message)
Kingdom of Spain
Reino de España
Motto: Plus Ultra
Anthem: Marcha Real
Territories that were ever part of the Spanish Empire during the Enlightement.
|Common languages||Spanish, Catalan (including Valencian), Basque, Galizian, Bable, Fala, Aragones, Occitan (Aranes)|
|Historical era||Enlightenment era|
• death of Charles II
|1 November 1700|
|24 September 1810|
|ISO 3166 code||ES|
Part of a series on the
|History of Spain|
The ideas of the Age of Enlightenment (in Spanish, Ilustración) came to Spain in the eighteenth century with the new Bourbon dynasty, following the death of the last Habsburg monarch, Charles II, in 1700. This period in Spanish history is often referred to as Bourbon Spain. "Like the Spanish Enlightenment, the Spanish Bourbon monarchs were imbued with Spain's Catholic identity."  The period of reform and ' enlightened despotism' under the Bourbons focused on centralizing and modernizing the Spanish government, and improvement of infrastructure, beginning with the rule of King Charles III and the work of his minister, José Moñino, count of Floridablanca. In the political and economic sphere, the crown implemented a series of changes, collectively known as the Bourbon reforms, which were aimed at making the overseas empire more prosperous to the benefit of Spain.
The Bourbon monarchs sought the expansion of scientific knowledge, which had been urged by Benedictine monk Benito Feijóo. From 1777 to 1816, the Spanish crown funded scientific expeditions to gather information about the potential botanical wealth of the empire.  When Prussian scientist Alexander von Humboldt proposed a self-funded scientific expedition to Spanish America, the Spanish crown accorded him not only permission, but the instructions to crown officials to aid him. Spanish scholars sought to understand the decline of the Spanish empire from its earlier glory days, with the aim of reclaiming its former prestige.  In Spanish America, the Enlightenment also had an impact in the intellectual and scientific sphere, with elite American-born Spanish men involved in these projects.  The Napoleonic invasion of the Iberian peninsula was enormously destabilizing for Spain and the Spanish overseas empire. The ideas of the Hispanic Enlightenment have been seen as a major contributor to the Spanish American wars of independence, although the situation is more complex. 
- 1 Bourbon Spain
- 2 The Enlightenment in Spain
- 3 See also
- 4 References
- 5 Further reading
- 6 External links
The French Bourbons had a strong claim on the Spanish throne following the 1700 death of the last Habsburg monarch, Charles II, who died without an heir. France won War of the Spanish Succession and the Bourbon monarchy was established in Spain. Once it consolidated rule in Spain, the Bourbon monarchs embarked upon a series of reforms to revitalize the Spanish empire, which had significantly declined in power in the late Habsburg era. The ideas of the Age of Enlightenment had a strong impact in Spain and a ripple effect in Spanish American Enlightenment Spain's overseas empire. When French forces under Napoleon Bonaparte invaded the Iberian peninsula and placed Napoleon's brother Joseph on the throne of Spain, there was a crisis of legitimacy in both Spain and its overseas empire. A cortes (parliament) was convened in Cádiz, which ratified a liberal constitution in 1812, limiting the power of the monarchy constitutionally as well as the power of the Catholic Church. Ferdinand VII claimed he supported the liberal constitutions, but once restored to power in 1814, he renounced it and reverted to unfettered absolutist rule. In most parts of Spanish America during the Napoleonic period in Spain, wars of independence broke out, so that by the time Bourbon Ferdinand VII was restored to the throne in 1814, much of Spanish America had achieved independence and established constitutional republics. New Spain (Mexico) and Peru were the exceptions, becoming independent in 1821 (Mexico) and 1824 (Peru). Mexico briefly had a monarchy under royalist military officer turned insurgent Agustín de Iturbide, who was overthrown in favor of a federated republic under the Constitution of 1824.
The last few years of the rule of the mentally challenged and childless Charles II, were dominated by the politics of who would succeed the unfortunate monarch, the last Spanish king of the Habsburg dynasty. Spain was at the center of this political crisis, but it was the "object not the arbiter."  Economic troubles, the decay of the Spanish bureaucracy, a series of defeats in wars against France, and the erosion of imperial institutions in the seventeenth century had left Charles the king of a declining empire, and his physical and mental weakness provided him with little ability to reverse the course of his country. The vastness of the Spanish Empire in the New World, along with her naval resources, had made Spain a vital part of European power politics. If the throne of Spain was to go to a relative of the king of France, or if the two countries were to be united, the balance of power in Europe might shift in France's favor. If it remained in the hands of another member of the anti-French, Austrian Habsburg dynasty, the status quo would remain. European politics during the seventeenth century became dominated by establishing an orderly succession in Spain that would not alter the balance between Europe's great powers.
Charles II, who was the unfortunate result of generations of Habsburg inbreeding, decreed in one of his last official acts that his crown would pass to his nephew, Philip of Anjou, the grandson of King Louis XIV of France of the House of Bourbon, and the heir to the French throne. Castilian legitimists, who valued the succession of the closest heir of the king over the continuation of Habsburg rule, supported the king's plan. Spanish officials were also concerned with Spain remaining an independent country, rather than another part of the French or Austrian empires. Even so, on hearing the news that his grandson had become King of Spain, Louis XIV proclaimed, "The Pyrenees are no more."  At age 17, Philip V arrived in Madrid in early 1701 without visible opposition. Philip confirmed the fueros of Catalunya and Aragon, and to all appearances the Bourbon succession was successful and secure. 
The Austrian Habsburg claimant to the Spanish throne, Archduke Charles of Austria, argued that he had been cheated out of the throne of Spain unfairly. England and the Netherlands, who had backed Electoral Prince Joseph Ferdinand of Bavaria as the successor to the Spanish throne as a means of preventing either Spain or France from becoming more powerful, accepted Philip of Anjou as king of Spain but eventually chose to support Austria after Louis XIV did not respect the fact that France was not to take too much advantage of a Bourbon on the Spanish throne. Austria, with the backing of England and the Netherlands, chose to go to war over the issue after France rejected a plan of partition, launching the War of the Spanish Succession.
The Spanish cortes remained divided on the issue, and when war was declared in 1702, the war between Europe's great powers also became a civil war in Spain. Valencia, Catalonia, and Aragon pronounced in favor of the Austrian candidate as king, fearing that Philip of Anjou would attempt to change the decentralized administration of the country that afforded the Catalans and Aragonese considerable autonomy from Madrid. An English-Dutch army, marching from Portugal, attacked Spain in 1705, but was for a time repulsed. The war elsewhere seemed to go well for France and her candidate for the Spanish throne initially, but at the Battle of Blenheim in 1704, Austria was saved from defeat by an English expedition under the Duke of Marlborough. Ten years of difficult fighting in Germany, Italy, Iberia, the Low Countries, and even the New World (where it became known as Queen Anne's War) followed. Madrid itself was occupied in 1706 and 1710, and much of the Spanish countryside was devastated by campaigns fought across its soil, both by foreign soldiers, its own army and the revolting Aragonese, Catalans, and Valencians.
A compromise peace came with the Treaty of Utrecht in 1713 between France and most of the great powers. France and the Allies agreed that Louis XIV's grandson, Philip, would become King Philip V of Spain, but that the thrones of France and Spain were never to be united. While France's territories remained largely intact, Spain was forced to cede her European empire in the peace; her Italian possessions, including Naples, Milan, and Sardinia, were given up to Austria, along with Sicily, which was ceded to Savoy. Spain was also forced to give up the Spanish Netherlands to Austria, and the island of Menorca and Gibraltar to Britain. In later years, however, many of these Italian territories, notably Naples and Sicily would revert to Spanish control. In exchange for accepting the loss of these European territories of the Spanish Empire, Philip was able to keep the remainder of the Spanish empire. Even after the peace was signed, however, the Catalans – who had been operating independently against Philip during the war, operating under the banner "Privilegis o Mort" (Privileges or Death)  - continued to resist after the British withdrew; Barcelona was not retaken by Spanish forces until late in 1714. This date (September 11, 1714) is commemorated as the National Day of Catalonia. However, much of the country was in a state of economic instability due to the conflict, no matter which candidate to the Spanish throne was supported.
Philip V proved an effective administrator, centralizing the Spanish authority by eliminating regional cortes (parliaments) and beginning a process of making uniform the laws among the various regions of Spain's empire by eliminating special privileges (fueros). His selection of capable French and Italian ministers to key positions in the government reined in independent, isolated, and corrupt ministries that had flourished in the later period of Habsburg rule. Philip aimed at expanding economic activity and moved toward economic freedom, especially regarding Spain's trade in its overseas empire, in theory a Spanish monopoly. Expanding Spanish manufactures and agricultural exports was envisioned, so that trade did not benefit foreign powers who had horned in on the Spanish American trade. The House of Trade long operating in Seville, was moved to Cádiz in 1717. Philip permitted the foundation of the Basque Caracas Company in 1728, on the model of Northern European trading companies, to trade with Venezuela, a major producer of chocolate.  The free trade zone (comercio libre) within the Spanish sphere expanded further with later Spanish Bourbons.
Philip – a manic depressant[ citation needed] often dominated in his policies by his wife Elizabeth Farnese – adopted an aggressive foreign policy that invested Spain in a series of costly wars throughout his reign. The loss of so much of the European territory promised to him by Charles II's decree and Philip V's personal ambition put him at unease with the treaty. Philip's wife Elizabeth – a member of the ducal house of Parma – and her favorite minister, Cardinal Giulio Alberoni, desired to have their claims in Italy and those of Philip's restored. But an alliance of France, Britain, and the Netherlands challenged Spain's ambitions which threatened the peace of Europe. In 1717, Philip invaded Sardinia, one of the territories lost to Austria after the War of the Spanish Succession. The invasion of Sicily thereafter prompted the formation of the Quadruple Alliance of Britain, France, Austria, and the Netherlands to oppose Philip's ambitions. In 1720, embarrassed by the failure of Spanish arms at sea and on land in the War of the Quadruple Alliance, Philip dismissed Alberoni and signed a peace treaty with Austria, with both sides recognizing the Treaty of Utrecht.
The Spanish again attempted to regain some of their lost territory in the Anglo-Spanish War of 1727–1729. An alliance was concluded in 1725 with the Austrians, who agreed to help the Spanish in retaking key naval bases in the Mediterranean - Menorca and Gibraltar – from the British.
In response, an alliance was forged by the British Secretary of State, Charles Townshend, 2nd Viscount Townshend, with France and the Netherlands; when Philip did finally lay siege to Gibraltar, Austria declined to intervene against the powerful alliance, and Spain was left alone once again. French armies invaded the Basque country and Britain and Netherlands elected to devastate Spain's New World empire and disrupt precious metal shipments hoping to prevent Philip from buying the Austrians into intervention; the allies suffered greater losses in men than the Spanish but the plan succeeded and Philip was forced to sue for peace in 1729. Elizabeth Farnese did get one of her wishes, though; the Italian duchies of Parma, Piacenza, and Tuscany were restored to her family. 
After 1729, Philip was more reserved in his use of Spanish power and sought the close support of allies, in particular France: a more cautious strategy that yielded positive results. Philip sought a friendly axis with his relatives in France in the War of the Polish Succession, where he succeeded in regaining Naples and Sicily for his son, the future Charles III of Spain. The Family Compact with Louis XV of France was signed in 1733, bringing the two states closer together after the embarrassments of the Quadruple Alliance. Friction with Britain prompted by the War of Jenkins' Ear (1739–1741) pushed Philip into a closer alliance with France in the years leading to the War of the Austrian Succession, in which Philip obtained further concessions from Austria for his family in Italy. This restored Spanish power in Italy to much of its pre-war extent, and added new territories that had not previously been part of the Spanish Empire in Italy.
Late in his reign, Philip elected to place the reformation of his government in the hands of his ministers. The youthful and ambitious Zenón de Somodevilla had been created Marquis of Ensenada in 1736 for his successful diplomacy after the War of the Polish Succession, and seven years afterwards, in 1743, he was made Philip (and Elizabeth's) favorite at court, and for the remainder of Philip's reign, Ensenada effectively ruled Spain. Ensenada sought a cautious but independent foreign policy that distanced his country from both France or Britain, and desired a stable, peaceful environment in which Spain could reform her institutions.
The end of the War of the Austrian Succession had awarded Ensenada a victory that cemented his support in Spain. However, two years before the war ended, King Philip, his strongest supporter, died, and was succeeded by his son Ferdinand VI. Ferdinand was Philip's son by his first marriage to Princess Maria Luisa of Savoy; he had suffered under the domineering influence of his stepmother as a child, and as king, he was constantly unsure of his own abilities. Elizabeth Farnese, the queen who had effectively controlled Philip V, left the court on her husband's death. Like his father, Ferdinand was extremely devoted to his wife, and she dictated much of his policy and political decisions; at the time of Ferdinand's coronation in 1746, it was said that "Queen Barbara has succeeded Queen Elizabeth." For her part, Queen Maria Barbara de Braganza, a member of the Portuguese royal family, advocated a policy of neutrality that coincided with the opinions of her leading courtiers, far different from the irredentist policy of Elizabeth.
Ferdinand's rule reaped good fortune and the rewards of Philip V's reforms. He was a charitable ruler, relieving drought-stricken Andalusia from all taxes in 1755 and devoting large sums of money to the reconstruction of that part of the country. As king, he deferred many of his judgments to his leading ministers.
Ensenada continued to be the leading member of court in the early part of Ferdinand's reign. After the successful alliance with France in the War of the Austrian Succession, he advised strengthening that bond as a means of protecting Spain's vulnerable security and checking British interests in her empire. He was opposed by an anglophile faction at court led by Jose de Carvajal y Láncaster, a mixed British-Spanish gentleman descended from the House of Lancaster. Carvajal believed that the key to Spain's defense and modernization was a closer alliance with Britain, whose naval power could complement Spain's empire and whose commercial strength could encourage economic development in Spain. Carvajal's most enduring accomplishment was the 1750 agreement with Portugal, which ended a long, low-level conflict in Banda Oriental (southern Uruguay) between the two countries.
The agreement with Portugal, however, was to have important political consequences for Spain. The agreement traded seven Jesuit-established and -operated missions in southern Uruguay for Portuguese-founded and -controlled Uruguay. The plan (opposed by both the Jesuits and the British) led to resistance led by the Jesuits and their native Guaraní allies in the area. Both Spain and Portugal responded in force to the crisis, suppressing the Jesuits and Guaraní in the War of the Seven Reductions. The war broke a traditionally friendly relationship between the Spanish government and the Jesuits and launched a period of anti-Jesuit policies both in Spain and Portugal that would be continued by Charles III of Spain.
A scandal at court, resulting from a conspiracy between Carvajal and the British ambassador, led to the embarrassment of Ensenada and his disrepute at court. When Carvajal died in 1754, Ferdinand and his wife dismissed Ensenada, fearing that the Marquis's French sympathies would lead to an alliance with Louis XV of France and war, without Carvajal's British sympathies to counterbalance him. An Irishman, Ricardo Wall, was appointed to replace Ensenada as chief minister. Wall, a staunch defender of Spain's neutral policy, successfully kept the country out of war for the remainder of Ferdinand's reign, in spite of the outbreak of the largest European war since the Thirty Years' War, the Seven Years' War.
Although his wife had always feared that Ferdinand would die before her and leave her destitute – she had amassed huge personal wealth as a safeguard against this – it was his wife Maria Barbara who would precede him, dying in 1758. Deeply distraught by her death, Ferdinand became apathetic to his duties as king, and indeed, suicidal. He died a year later, in 1759.
Ferdinand's successor was Charles III, son of Philip V by his second wife, Elizabeth Farnese. Charles was the half-brother of Ferdinand VI, and considered "the most successful monarch of Spain after Ferdinand and Isabel" in the late fifteenth and early sixteenth centuries. "He deserves high a rank among the enlightened despots of the eighteenth century, for in many ways he accomplished more than such famous rulers as Frederick the Great of Prussia, and Joseph II of Austria."  Charles had been named Duke of Parma at his mother's demand at the age of sixteen. His experience there gave him a place to experiment with the practice of enlightened despotism. He exhibited a martial spirit early on, acquiring Naples and Sicily by force of arms and becoming " King of the Two Sicilies," though his tastes were generally more peaceful. On arriving in Spain, he did not share Carvajal's taste for an alliance with Britain; he had borne the island nation a certain mistrust ever since a British fleet had forced his neutrality in the War of the Austrian Succession.
He had been introduced to reform by his mentor in Sicily, Bernardo Tanucci. Although Tanucci remained behind in the Two Sicilies to advise Charles's son, King Ferdinand I of the Two Sicilies, as the two thrones could not be united by consequence of treaty, Charles carried with him a cadre of Italian reformers who saw potential in the Spanish bureaucracy for modernization. The architect of the first phase of Charles III's reforms was one such Italian, Leopoldo de Gregorio - a man of humble origins whose ability as a military supplier for the Neapolitan army impressed the king and raised him to royal prominence. Created "Marquis of Esquilache" in 1755, Gregorio was one of Spain's leading statesman from the arrival of Charles III to the Marquis's death in 1785.
Although the Seven Years' War had broken out in 1756, Spain had managed to remain strictly neutral under the ministry of Ricardo Wall, who continued to lead Spain's government in the early years of Charles III. Charles, however, bore a grudge against the English and as the war became increasingly desperate for France, he went against his chief minister's wishes and intervened on France's behalf in 1762. Spain fared poorly in the war, and the British briefly occupied Havana and Manila within a year. Florida was ceded to the British and Spain recognized British control over Menorca and Gibraltar in 1763, although the vast territory of Louisiana was given to Spain to compensate her for her losses. After the Treaty of Paris (1763), however, Spain could focus on internal development.
By far the largest landholder in Spain, the Church had been treated with great charity by the Spanish kings of the seventeenth century - Philip IV in particular donated large tracts of territory in religious piety. Much of this land went unused, and a great deal of the remainder of the country was owned by gentlemanly hidalgos who lived primarily off of the state. The system had grown long obsolete, and a growing population (Spain's population would increase from eight to twelve million between 1700 and the French Revolution) had put great pressure on the government to reform. Like neighboring Portugal, Spain's antiquated bureaucracy had grown dependent on the income and production from its colonies to support an unmanageable, large class of landowning, nonproductive gentlemen and clergy.
The Enlightenment had been a force of anticlericalism in Europe, and Charles, in applying its lessons to Spain, saw it less stridently, seeking to strengthen the power of the crown (regalism) against that of the Catholic Church and the papacy. Ferdinand VI had undertaken to reduce the power of the Jesuits in Spain and had arranged for Spain's kings to appoint her own bishops, a power that France's kings had held since the fifteenth century. Charles, who advocated a radical policy and rapid modernization of the country, expelled the Jesuit Order from Spain completely in 1767 (see Suppression of the Jesuits). The Inquisition was scaled down, but not completely eradicated; as late as 1787, a woman was burned as a witch.
Land reform and agricultural reform alienated both clergymen and landed elites in Spain. Charles chose to ally with the merchantmen of his country and a growing middle class that came with a new prosperity during his rule. An advocate of free trade, Charles reduced the tariff barriers that had been the core of Spanish trade policy for centuries. The Marquis of Esquilache successfully liberalized the grain trade in 1765, but riots broke out in 1766 in due to the rise in grain prices.
Although he believed in centralized government and continued the reforms of his predecessors to reduce the autonomy of the regional parliaments that could potentially challenge his power, Charles approved of establishing prototype chambers of commerce, the Economic Societies of the Friends of the Country) to encourage local economic development and initiative. The national infrastructure was improved to foster the development of Spanish manufacturing, and a unified monetary system was implemented.
The reforms were not without costs, however, and in 1766, in the context of a worldwide grain shortage and the difficulties of the recently liberalized grain trade, riots broke out in Madrid and other cities in Spain against rising grain prices. The " Motin de Esquilache" drove the king from his capital and embarrassed the king's chief minister. Aragonese grandee, the Count of Aranda. Aranda gained prominence during the crisis and led the government in the king's absence. Aranda was the only titled aristocrat in Charles's administration; the king generally preferred men of lower social origin who were university graduates from outside Castile. Charles granted noble titles to able men in his administration, who became part of a loyal and progressive bureaucracy.  Charles removed Esquilache from power in Madrid, naming Ambassador to Venice.
Aranda, as the leader of the Aragonese faction at court, favored a more decentralized system of government. Following the ouster of Esquilache for a time Aranda was the leading figure in Spanish politics. A criminal prosecutor named José Moñino gained prominence as the investigator of the riots and as an outspoken supporter of the king's reformist policies. The riots were attributed to the Jesuits, who were advocates of papal power, when Bourbons were centralizing regal power. The role of the Jesuits in the riots was named as the reason to oust the Jesuits from Spain and its empire in 1767. Esquilache had arranged to have him made ambassador to Venice in 1767; in 1773 Moñino succeeded in having the Pope revoke the papal charter of the Jesuit Order. For this success, Charles named Moñino the Count of Floridablanca.
The new count was named chief minister in 1777 and undertook the material reform of the Spanish bureaucracy. His chief bureaucratic successes were the creation of a true cabinet system of government in 1778 and the creation of Spain's first national bank, the National Bank of San Carlos, in 1782.   Recognizing the damage done to Spain's education system after the expulsion of the Jesuits, Floridablanca undertook drastic reform to hire new teachers and modernize Spain's education system. Floridablanca's most enduring accomplishment was the freedom of trade in Spain's empire in the New World to foreigners.
Although Floridablanca – like Carvajal before him – admired British governance and believed that a cordial relationship with George III of the United Kingdom was the best policy for Spain, the American Revolutionary War was too great an opportunity for King Charles, and Spain went to war against Britain alongside France and the Netherlands in 1779, after providing monetary assistance to the rebels. Bernardo de Gálvez, the governor of Spanish Louisiana, led the campaign to retake the forts lost to the British since 1762; Pensacola, Florida was retaken in 1782, and the Bahamas were seized later that year. The Treaty of Paris (1783) restored much of what Spain had lost in the Seven Years' War, including Florida.
Charles III's eldest son was both epileptic and mentally disabled and was passed over for the throne in favor of his second eldest, Charles IV. Charles IV was seen by many of his time as being as uninterested in politics as Ferdinand VI had been. His chief interest upon his arrival in Spain (he had grown up in Naples) was hunting, and for all of his rule, his policies were dominated by the will of his wife. 
His wife Maria Luisa of Parma, however, took as her lover Manuel de Godoy, a soldier from a humble family. He was dashingly handsome, particularly when Maria Louisa compared him to Charles IV. He had made the queen's acquaintance in 1788, months before she became queen, and by the time of her accession, she had become completely enamored. The king was very fond of Godoy, even though he was fully aware of his wife's adultery, and Godoy became Spain's chief minister in 1792.
The chief minister at the time of Charles IV's accession, José Moñino, count of Floridablanca, was not easily ousted and had many supporters in the court, particularly in Castile. Floridablanca's chief opponent in Spanish politics was Pedro Pablo Aranda, the leader of the Aragonese faction. Godoy made an alliance with Aranda, with whom Godoy sympathized, against Floridablanca. With the outbreak of the French Revolution and the execution of Louis XVI in 1792, Floridablanca's liberalism faced greater skepticism. Aranda and Godoy had Floridablanca imprisoned in 1792 on charges of embezzlement, of which he was later acquitted.
The spirit of reform that had made the reign of Charles III an era of renewed prosperity for Spain was extinguished in the reign of Charles IV. His queen and her lover were uninterested in the improvement of the Spanish bureaucracy and regarded Floridablanca as an exponent of the very sort of liberalism that was tearing France apart. The Aragonese faction led by Aranda, allied to many of the causes that had opposed Charles III's reforms, managed to undo much of the changes brought about in Charles III's tenure.
After the execution of Louis XVI in 1793, 20,000 men were mobilized and marched to the French border. The army, however, had been allowed to languish in Charles III's reign, and it was ill-equipped and ill-trained to cope with a French invasion. Navarre was quickly seized by the French, although the Spanish managed to hold their ground in Catalonia and even invaded French Languedoc. Godoy, unimpressed with Spain's military effectiveness, decided to come to terms with the new French Republic, and in 1795 signed the Treaty of Basel, guaranteeing peace with France with the cession of Santo Domingo to the Republic.
Godoy, having abandoned his allies in the United Kingdom and Austria, faced a decision: whether to continue to fight the Revolutionary France that had already defeated Spain once before, or to join the French side and hope for better times. The Spanish, after initially opposing the French, signed the Treaty of San Ildefonso in 1796, allying Spain to France, in exchange for French support for Charles IV's relations ruling the Italian duchy of Parma. In response, the British blockaded Spain in 1797 and separated her colonial empire from the mother country. By the end of 1798, the Spanish fleet had been defeated by the British, and Menorca and Trinidad were occupied. In 1800, the Spanish returned Louisiana to France, which had been given to them in compensation for their losses at the end of the Seven Years' War.
The Portuguese, who opposed the French, continued to trade with the British in spite of a series of French demands that they close their ports to British ships. In 1801, the Spanish delivered an ultimatum on behalf of France, and in the following border war, occupied the town of Olivenza (Olivença) before the Portuguese agreed to the Spanish and French demands. The town – which is disputed to the present day – continues to be administered by Spain though Portugal contends that the Congress of Vienna restored it to Portugal.
The Treaty of Amiens in 1802 provided for a temporary truce in hostilities, only to be broken in 1804 when the British captured a Spanish treasure fleet off Cadiz. The French planned an invasion of England in the coming year; the Spanish fleet was to be an integral part in assisting this invasion. At the Battle of Trafalgar in 1805, the Spanish navy and the French Mediterranean fleet, attempting to join forces with the French fleets in the north for the invasion, were attacked by Admiral Lord Nelson at the head of a British fleet in one of history's greatest naval engagements. The disastrous defeat that the Spanish and French suffered assured British dominance at sea and seriously shook the resolve of the Spanish who began to doubt the usefulness of their always mutually suspicious alliance with Napoleon's regime.
After Trafalgar, Godoy withdrew from the Continental System that Napoleon had devised to combat Britain, only to join it again in 1807 after Napoleon had defeated the Prussians. Napoleon, however, had lost his faith in Godoy and King Charles; there was also growing support in Spain for the king's son, Ferdinand, who opposed the popularly despised Godoy. Ferdinand, however, favored an alliance with Britain, and Napoleon, always suspicious of the Bourbons, doubted the trustworthiness of any Spanish royalty.
In 1808, Spain and France agreed to the partition of Portugal, which had renewed its support of the British after Trafalgar. The French and Spanish quickly occupied the country. Prince Ferdinand traveled to France, and rumors spread that he was asking for Napoleon to oust Godoy from power; the Spanish King sided with his favorite. Riots broke out in the country against Godoy, and he was arrested by a mob. To save him, the king abdicated in favor of his son Ferdinand. Napoleon, however, had lost confidence in the Spanish monarchy and when Ferdinand traveled to France to obtain the French emperor's support, Napoleon pressured Ferdinand to abdicate. He was replaced by Joseph Bonaparte, Napoleon's brother. The Spanish chose to resist.
The Spanish people rallied around the cause of Prince Ferdinand, who, even as a prisoner in France, was made into a national hero in what became a "war of independence" for Spain. Godoy, Charles IV, and his wife retired first to France, then to Italy, and left Spanish politics permanently. 
The installation of Joseph Bonaparte as King of Spain sparked a revolution in Spain. On the 3 May 1808, a revolt in Madrid was bloodily suppressed by the French army, which now found itself attempting the occupation of both Portugal and Spain. The incident and the perceived brutality of the French response created a rallying point for Spanish revolutionaries; the executions were captured famously by the Spanish painter Francisco Goya. The Spanish army, on the whole, pronounced itself in favor of Ferdinand and joined the British and Portuguese in a united front against the French.
Regional juntas were set up that declared Joseph's monarchy invalid; the clergy rallied against the "godless" French. The juntas collectively asked Britain for aid, and London was only too happy to oblige. The Junta in Seville declared itself the Supreme Junta for Spain in 1808, and most regional juntas (and the colonies in the New World) assented to the supremacy of the Seville Junta, which became a provisional government for Spain in the absence of Ferdinand. A new French offensive the following year forced it to withdraw to Cadiz, where it would remain until close to the end of the war.
King Joseph had attempted to reconcile with the Spanish early on; at Bayonne, after the forced abdication of Ferdinand, Joseph gathered an assembly of Spanish notables to draft a constitution for his new Bonapartist regime in Spain. The most prominent members in Spanish politics – including the Count of Floridablanca – declined to attend. The cabinet and constitution that Joseph did present was viewed as illegitimate. Joseph entered Madrid on 25 July 1808, after the rebellion against his government was already well under way.
A series of victories against the French in 1808 prompted Napoleon himself to invade Spain in 1809, forcing the British and their allies to evacuate the peninsula in only two months' time. Satisfied, Napoleon placed command of the war in the hands of one of his marshals, Nicolas Jean de Dieu Soult. With the destruction of the Spanish army in 1808, Spanish resistance transformed into fierce guerrilla warfare. Although numerically superior to the regular British, Portuguese, and Spanish armies, so effective were the Spanish guerillas that of 350,000 men of the French Armée de l'Espagne, 200,000 were employed in the protection of France's vulnerable lines of supply stretching across the breadth of Spain.
Many Spanish liberals – carrying the tradition of Charles III and his ministers – saw in a close relationship with France the hope for modernity and progress in their country. Called " afrancesados," they viewed the end of the Inquisition and the establishment of a more secular, liberal monarchy with affection, but as the French occupation dragged on, popularity for French rule even among liberals waned. By 1812, many of these afrancesados had become members of the Spanish guerilla war. The Spanish Constitution of 1812 (the Cadiz Constitution) was drafted by the Supreme Junta. The constitution, written by an assembly dominated by liberal reformers, described a constitutional monarchy. The inquisition would be abolished, though Roman Catholicism was still the state religion and heresy a crime. The constitution – Spain's first – provided for freedom of speech, freedom of association, and universal manhood suffrage. In response to the constitution, France temporarily annexed Catalonia.
The British, under the command of Sir Arthur Wellesley, invaded Spain from Portugal in 1810. A Spanish force, pulled together from the remnants of the Spanish army and volunteer fighters, joined him and successfully defeated the French under the personal command of Joseph Bonaparte at the Battle of Talavera. For his victory, Wellesley was made Duke of Wellington, although not long after Talavera he was forced to retreat into Portugal once more. Although Wellington took Madrid on 6 August 1812, he retreated not long after back to Portugal. With the stretched and harassed French forces depleted when Napoleon redeployed troops for what would be a disastrous offensive against Russia, Wellington saw an opportunity and attacked again in 1813. At the Battle of Vitoria, on 21 June 1813, the French under the personal command of King Joseph were again defeated, and were subsequently forced as far back as the Pyrenees in early July. Fighting continued in the mountains throughout the winter, though in the spring of 1814 the Allies advanced into southern France.
Ferdinand was released by the French after the fall of Napoleon in 1814. On arriving in Spain, the most important question was whether he would swear by the Constitution of 1812, that the Supreme Junta had composed in his stead. The constitution, which limited the king's powers considerably in favor of a unicameral legislature, was deeply unpopular among the conservative Spanish clergy, and among the people of Spain who associated much of it with the French who had only months before been evicted from their country. Ferdinand refused to accept the liberal constitution, and continued his rule in Spain as Charles IV had; as an absolute monarch and it was during his reign that Spain lost most of its overseas empire in the Spanish American wars of independence.
The ideas of the Enlightenment in France came to Spain following the establishment of the Bourbon dynasty in Spain. The leading Spanish figure was Benito Feijóo (1676–1764) a Benedictine monk and professor. He was a successful popularizer noted for encouraging scientific and empirical thought in an effort to debunk myths and superstition. His Teatro crítico universal (1726–39) bemoaned that "physics, and mathematics are almost foreigners in Spain." 
The eighteenth century was an era with increasing absolutism in Europe, with centralization of power of monarchies, which sought to undermine rival powers, such as the Roman Catholic Church, modernize administration and promote economic measures for greater prosperity, and gain power in the international sphere.  In Spain, the ideas of the Age of Enlightenment reached Spain in attenuated form about 1750, and emphasized there reforms that would increase Spain's prosperity and return it to its former position as a major power. Even at the beginning of the Bourbon era, Spain was already creating institutions to systematize and promote intellectual research in the early eighteenth century with the founding of the National Library (1711), Royal Spanish Academy (1713), and the Royal Academy of History (1738).  Attention focused on medicine and physics, with some philosophy. French and Italian visitors were influential but there was little challenge to Catholicism or the Church such as characterized the French philosophes. In Spain, one of the leading intellectuals was Minister of Justice Gaspar Melchor de Jovellanos, who in an address to the Royal Academy of History, called on "patriots" to study legal history, particularly of the deep past of the Visigothic era, and faulted Spain for its failure "to conserve the constitution in its primitive purity." In his Informe en el expediente de ley agraria (1795), he deplored the accumulation of land by aristocrats and the Church, which kept most Spaniards landless. A solution, also urged by Campomanes, was the sale of all Church lands. 
By the 1770s the conservatives had launched a counterattack and used censorship and the Inquisition to suppress Enlightenment ideas,  but the "French Encyclopédie... was nonetheless available to readers who wanted it."  The writings of Montesquieu, Rousseau, Adam Smith, Condillac, Raynal, Buffon, and Linnaeus were in circulation among intellectual elites in Spain.  Historian Jonathan Israel argues that King Charles III cared little for the Enlightenment and his ministers paid little attention to the Enlightenment ideas influential elsewhere on the Continent. Israel says, "Only a few ministers and officials were seriously committed to enlightened aims. Most were first and foremost absolutists and their objective was always to reinforce monarchy, empire, aristocracy...and ecclesiastical control and authority over education." 
The crown sponsored a series of scientific expeditions of its own and authorized foreign scientists, such as La Condamine and Alexander von Humboldt, to its overseas empire, usually closed to foreigners. There were extended Royal Botanical Expeditions to Chile and Peru (1777–88), New Granada (1783–1816), and New Spain (1787–1803), which produced a huge number of detailed botanical drawings and specimens destined for the Royal Botanical Garden and the Royal Natural History Cabinet in Madrid.  The Malaspina Expedition was an important scientific expedition headed by Spanish naval commander Alejandro Malaspina over five years (1789–94), with naturalists and botanical illustrators gathering information for the Spanish crown.       The illustrators on the voyage included José de Pozo, trained at the Royal Academy of Fine Arts in Madrid, and, with other artists on the voyage, produced a plethora of botanical images as well as coastal views, ethnographic images, views of the expedition's ships, Descubierta and Atrevida, and a self-portrait in Patagonia.   In Mexico, the Malaspina Expedition helped spur the founding of a botantical garden in Mexico City, as well as the Museo de Historia Natural.  
Institutions founded in the later eighteenth century were designed to promote scientific knowledge, such as the Royal Botanical Gardens (1755) in Madrid, where specimens from the Malaspina Expedition augmented the collection.  In Mexico, the crown established the School of Mines (1792), based on the Basque institute at Vergara, headed by scientist Fausto Elhuyar, to increase scientific knowledge about mining Spain's most valuable commodity, silver.  The building was designed in the neoclassical style by Spanish architect Manuel Tolsá. The Spanish crown had mandated that "all new churches and other public buildings should be constructed in the neo-classic style, their design first approved by the Academy of San Fernando."  Madrid had a number of buildings constructed in neoclassic style; Charles III's architect, Juan de Villanueva, designed a neoclassical building in 1785 to hold the Natural History Cabinet, but which became the Prado Museum to display paintings and sculpture.
As part of the attempt to revitalize the historiography of Spain and Charles III's general centralizing policies, the Archive of the Indies was established in Seville in 1785 to bring together documents pertaining to Spain's overseas empire. 
- Richard Herr, "Flow and Ebb, 1700–1833" in Spain, A History, Raymond Carr, ed. Oxford: Oxford University Press 2000, p. 175.
- Daniela Bleichmar, Visible Empire: Botanical Expeditions & Visual Culture in the Hispanic Enlightenment. Chicago: University of Chicago Press 2012.
- Jorge Cañizares-Esguerra, How to Write the History of the New World: Histories, Epistemologies, and Identities in the Eighteenth-Century Atlantic World. Stanford: Stanford University Press 2001.
- John Tate Lanning. The Eighteenth-Century Enlightenment in the University of San Carlos de Guatemala. Ithaca: Cornell University Press 1958.
- Charles Griffin. “The Enlightenment and Latin American Independence” in Latin America and the Enlightenment (2nd edition). New York 1961.
- John Lynch, Bourbon Spain, 1700–1808. Oxford: Blackwell Publishers 1989, p. 22.
- "Spain - War of the Spanish Succession". Retrieved 11 February 2012.
- Lynch, Bourbon Spain p. 22.
- "Spain – War of the Spanish Succession". Retrieved 11 February 2012.
- Herr, "Flow and Ebb" p. 184.
- Simms, Brendan. Three Victories and a Defeat: The Rise and Fall of the First British Empire. Penguin Books, 2008. p.211
- Herr, Spain, p. 51
- Richard Herr, Spain, Englewood Cliffs, NJ: Prentice-Hall Inc., 1971, p. 51.
- Her, Spain, p. 59.
- Carlos Marichal, "Banco de San Carlos (Spain)" in Encyclopedia of Latin American History and Culture, New York: Charles Scribner's Sons, 1996, vol. 1, p. 278.
- Earl Hamilton, "Plans for a National Bank in Spain, 1701–1783" in Journal of Political Economy, 58, no. 3 (1949): 315–36.
- Payne, History of Spain and Portugal (1973) 2:415–21
- Payne, History of Spain and Portugal (1973) 2:422–28
- Feijoo quoted in David Brading, The First America: The Spanish Monarchy, Creole Patriots, and the Liberal State, 1492–1867. New York: Cambridge University Press 1991, p. 423.
- John Lynch, Bourbon Spain, 1700–1808. Oxford: Basil Blackwell 1989, p. 254.
- Lynch, Bourbon Spain p. 256.
- David Brading, The First America: The Spanish Monarchy, Creole Patriots, and the Liberal State. New York: Cambridge University Press 1991, pp. 507–11.
- Payne, History of Spain and Portugal (1973) 2:367–71
- John Lynch, Bourbon Spain, p. 256 citing Jean Sarrailh, L'Espagne éclairée de la seconde moitiéée du XVIIIe siècle pp. 269–70.
- Lynch, Bourbon Spain, pp. 256–57.
- Jonathan Israel (2011). Democratic Enlightenment:Philosophy, Revolution, and Human Rights 1750-1790. Oxford University Press. p. 374.
- Daniela Bleichmar, Visible Empire: Botanical Expeditions and Visual Culture in the Hispanic Enlightenment. Chicago: University of Chicago Press 2012, p. 4.
- Bleichmar, Visible Empire, pp. 16–18.
- La expedición Malaspina 1789–1794. 9 vols. Madrid: Lunwerg Editores 1987–96.
- Andrés Galera Gómez, La ilustración española y el conocimiento del nuevo mundo. La ciencias naturales en la expedición Malaspina (1789–1994): La labor científica de Antonio Pineda. Madrid: CSIC 1988.
- Dolores Higueras Rodríguez (ed.) La Botánica en la Expedición Malaspina 1789–1794. Madrid: Turner Libros 1989.
- Juan Pimentel, La física de la monarquía. Ciencia y política en el pensamiento colonial de Alejandro Malaspina (1754–1810). Madrid: Doce Calles 1998.
- María Pilar de San Pío Aladrén and María Dolores Higueras Rodríguez (eds.) La armonía natural. La naturaleza en la expedición marítima de Malaspina y Bustamante (1789–1794). Madrid: Lunverg Editores 2001.
- Bleichmar, Visible Empire, p. 17.
- Carmen Sotos Serrano, Los pintores de la expedición de Alejandro Malaspina. Madrid: Real Academia de Historia 1982.
- Enrique Florescano, "The Creation of the Museo Nacional de Antropología and its scientific, educational, and political purposes" in Nationalism: Critical concepts in Political Science, John Hutchinson and Anthony D. Smith, eds. Vol. IV. London: Routledge 2000, p. 1238.
- Miguel Angel Fernández, Historia de los Museos de México. Mexico: Fomento Cultural del Banco de México 1987.
- Carmen Añon Feliú, Real Jardín Botánico de Madrid, sus orígenes 1755–1781. Madrid: Real Jardín Botánico 1987.
- David Brading, Miners and Merchants in Bourbon Mexico, 1763–1810. New York: Cambridge University Press 1971, p. 165.
- Brading, The First America, p. 510.
- Jorge Cañizares-Esguerra, How to Write the History of the New World. Stanford: Stanford University Press 2001, p. 170.
- Addy, George M. The Enlightenment in the University of Salamanca. Durham, N.C.: Duke University Press 1966.
- Bleichmar, Daniela. Visible Empire: Botanical Expeditions & Visual Culture in the Hispanic Enlightenment. Chicago: University of Chicago Press 2001.
- Cañizares-Esguerra, Jorge, How to Write the History of the New World: Histories, Epistemologies, and Identities in the Eighteenth-Century Atlantic World. Stanford: Stanford University Press 2001.
- Elliott, John H. Empires of the Atlantic World: Britain and Spain in America 1492–1830 (2007)
- Engstrand, Iris H.W. Spanish Scientists in the New World: The Eighteenth-Century Expeditions. Seattle: University of Washington Press 1981.
- Herr, Richard. The Eighteenth-Century Revolution in Spain. Princeton: Princeton University Press 1958.
- Herr, Richard (1971). An Historical Essay on Modern Spain. Chapter 4: Enlightened Despotism and the Origin of Contemporary Spain. University of California Press. ISBN 0520025342
- Jaffe, Catherine M., and Elizabeth Franklin Lewis, eds. Eve's Enlightenment: Women's Experience in Spain and Spanish America, 1726–1839 (2009)
- Kamen, Henry (2001). Philip V of Spain : the king who reigned twice. New Haven : Yale University Press. ISBN 0-300-08718-7
- La Force, James C. Jr. The Development of the Spanish Textile Industry, 1750–1800. Berkeley and Los Angeles: University of California Press 1965.
- Lehner, Ulrich L. and O'Neill Printy, Michael (2010). A Companion to the Catholic Enlightenment in Europe. Volume 20 of Brill's Companions to the Christian Tradition, ISSN 1871-6377. Brill, 2010. ISBN 9004183515
- Lynch, John. Bourbon Spain 1700–1808 (1989)
- Noel, C.C. "Opposition to Enlightened Reform in Spain: Campomanes and the Clergy, 1765–1775." Societas 3, 1 (1973) pp. 21–43.
- Paquette, Gabriel B. Enlightenment, Governance, and Reform in Spain and Its Empire, 1759–1808 (2007)
- Shafer, R.J. The Economic Societies in the Spanish World, 1763–1821. Syracuse 1958.
- Smith, Angel. Historical dictionary of Spain (2009)
- Walker, Geoffrey J. Spanish Politics and Imperial Trade, 1700-1789. Bloomington : Indiana University Press, c1979.
- Anes Alvares, Gonzalo. Economía e Ilustación en la España del siglo XVIII. Barcelona 1969.
- Egido Martínez, Teofanes (2001). Carlos IV. Madrid : Arlanza Ediciones. ISBN 84-95503-22-0
- Fernandez, Roberto (Fernandez Diaz) (2001). Carlos III. Madrid : Arlanza Ediciones. ISBN 84-95503-21-2
- Guimera, Agustín (1996). El reformismo borbonico : una visión interdisciplinar. Madrid : Alianza : Consejo Superior de Investigaciones Científicas. ISBN 84-206-2863-8
- Rodríguez Díaz, Laura. Reforma e Ilustración en la España del siglo XVIII. Pedro Rodríguez de Campomanes. Madrid, 1975.
- Santos, José (2002). Martín Sarmiento : Ilustración, educación y utopía en la España del siglo XVIII. La Coruña: Fundación Barrié de la Maza. ISBN 84-9752-009-2
- Sellés, Manuel, José Luis Peset, and Antonio Lafuente, eds. Carlos III y la ciencia de la ilustración. Madrid: Alianza Editorial 1988.
- Ubieto Arteta, Antonio (1997). Historia ilustrada de Espana, v. 5: El Barroco espanol y el reformismo borbonico. Madrid : Debate ; Valencia : Circulo de Lectores. ISBN 84-226-6342-2
- Ubieto Arteta, Antonio (1997). Historia ilustrada de Espana, v. 6: Guerra, revolucion y Restauracion. 1808–1833. Madrid : Debate ; Valencia : Circulo de Lectores. ISBN 84-226-6343-0
|Wikimedia Commons has media related to Enlightenment in Spain.|
- Library of Congress Country studies: Spain
- KMLA History of Spain
- Artehistoria, providing biographies, histories, and lots of pictures (in Spanish)
- Portal Fuenterebollo, providing information on specific Spanish historical figures. In Spanish.