Instruct: Given a question, retrieve documents that can help answer the question.
Query: Who was the last ruling monarch of Spain?
Spain came into existence as a single, united kingdom under Charles I of Spain on 23 January 1516. The monarchy was briefly abolished by the First Spanish Republic from 11 February 1873 until 29 December 1874. The monarchy was abolished again on 14 April 1931, first by the Second Spanish Republic – which lasted until 1 April 1939 – and subsequently by the dictatorship of Francisco Franco, who ruled until his death on 20 November 1975. Monarchy was restored on 22 November 1975 under Juan Carlos I, who was also the monarch until his abdication in 2014. His son Felipe VI is the current monarch. 
The 1978 constitution confirms the title of the monarch is the "King of Spain", but that he may also use other titles historically associated with the Crown,
including the kingdoms of Castile and León, Aragon, the Two Sicilies, Jerusalem, Navarre, Granada, Seville, Toledo, Valencia, Galicia, Sardinia, Córdoba, Corsica, etc.
The threat of internal stability remained until the marriage of Queen Isabella I of Castile and King Ferdinand II of Aragon in 1469. The two monarchs were promptly challenged by Joan of Castile but were swiftly successful. Isabella would go on to establish the "Hermandad" militia system, which would provide her with a royal counterbalance to any future challenge from the nobility. The two monarchs proceeded to conquer the Kingdom of Granada, the last Islamic state in the Iberian peninsula, which was completed by 1492. In that same year, the Alhambra Decree was issued, expelling all Jews from both Castile and Aragon. Now unified, Spain now enjoyed relative internal stability; rights and lands across the Mediterranean; and a strong tradition of seafaring in both the Atlantic and Mediterranean, which it would maximise in the coming decades.
The end of the Hapsburg dynasty in 1700 saw major administrative reforms in the eighteenth century under the Bourbon monarchy, starting with the first Spanish Bourbon monarch, Philip V (r. 1700-1746) and reaching its apogee under Charles III (r. 1759-1788). The reorganization of administration has been called "a revolution in government." Reforms sought to centralize government control through reorganization of administration, reinvigorate the economies of Spain and the Spanish empire through changes in mercantile and fiscal policies, defend Spanish colonies and territorial claims through the establishment of a standing military, undermine the power of the Catholic church, and rein in the power of the American-born elites.
Spain, it has been observed, is a nation-state born out of religious struggle mainly between Catholicism and Islam, but also against Judaism (and, to a lesser extent, Protestantism). The Reconquista against Al Andalus (ending in 1492), the establishment of the Spanish Inquisition (1478) and the expulsion of Jews (1492) were highly relevant in the union of Castile and Aragon under the "Catholic Monarchs" Isabel and Fernando (1492), followed by the persecution and eventual expulsion of the Moriscos in 1609. The Counter-Reformation (1563–1648) was especially strong in Spain and the Inquisition was not definitively abolished until 1834, thus keeping Islam, Judaism, Protestantism and parts of Enlightenment at bay for most of its history.
The centre of Spanish military power shifted dramatically in the early 18th century. The War of the Spanish Succession (1701–1714) was both a civil and international war in which the French backed the Bourbon contender for the Spanish throne and an alliance led by Austria, the Netherlands and Britain backed the Habsburg contender while a divided Spain fought on both sides. The war secured the Spanish throne for the Bourbon Philip as Philip V of Spain at the Peace of Utrecht but in the war's settlement, Spain had to give up the Spanish Netherlands, Naples, Milan, Sardinia, Sicily, Gibraltar and Menorca to the Habsburg allies. Spain's defeat by the combined alliance of France, Britain, the Netherlands and Austria in the War of the Quadruple Alliance (1718–1720) confirmed the decline from her former dominance, whilst the successful deployment of the Britain's Royal Navy into the Mediterranean, by exploiting the fortress of Gibraltar, gained in 1704 by an Anglo-Dutch force during the war of succession, would create considerable difficulties in the following years.
The 19th century was a turbulent time for Spain. Those in favour of reforming Spain's government vied for political power with conservatives, who tried to prevent reforms from taking place. Some liberals, in a tradition that had started with the Spanish Constitution of 1812, sought to limit the power of the monarchy of Spain and to establish a liberal state. The reforms of 1812 did not last after King Ferdinand VII dissolved the Constitution and ended the Trienio Liberal government. Twelve successful coups were carried out between 1814 and 1874. Until the 1850s, the economy of Spain was primarily based on agriculture. There was little development of a bourgeois industrial or commercial class. The land-based oligarchy remained powerful; a small number of people held large estates called "latifundia" as well as all the important government positions.
The May Revolution was a direct reaction to Spain's Peninsular War. In 1808, King Ferdinand VII of Spain abdicated in favor of Napoleon, who granted the throne to his brother, Joseph Bonaparte. A Supreme Central Junta led resistance to Joseph's government and the French occupation of Spain, but eventually suffered a series of reversals that resulted in the Spanish loss of the northern half of the country. On February 1, 1810, French troops took Seville and gained control of most of Andalusia. The Supreme Junta retreated to Cadiz and dissolved itself, and the Council of Regency of Spain and the Indies replaced it. News of these events arrived in Buenos Aires on May 18, brought by British ships.
Elizabeth I (7 September 1533 – 24 March 1603) was Queen of England and Ireland from 17 November 1558 until her death on 24 March 1603. Sometimes called The Virgin Queen, Gloriana or Good Queen Bess, Elizabeth was the last of the five monarchs of the House of Tudor.
Thus, the War of the Spanish Succession began. The war, over a decade long, was concluded by the treaties of Utrecht (1713) and Rastatt (1714). The allies were bent on removing Philip V from the succession to the French throne; he only agreed to this after the semi-Salic law was successfully enacted in Spain.
After the Moors lost control of Spain, King Philip II made treaties with them allowing them to practice their religion if they gave up their sovereignty, signing the Treaty of Granada in 1491. The Catholic monarchs however, abrogated the treaties and threatened to expel the Moors if they did not become Christians. The Moors did so, but continued speaking Arabic, and using Aljamiado alphabet for spoken Spanish. Some followed Islam in secret (Crypto-Islam). They were later referred to as "Moriscos", Moors and their descendants who converted to Christianity rather than be expelled. Religious conversion was simply not enough for the Catholic monarchs. Phillip II implemented a policy to fully assimilate the Moriscos into the Christian Spanish population and eliminate Moorish and Arab culture from Spain. The Moriscos were forced to abandon their Arabic names and adopt a completely Hispanized heritage and give up their children to be educated by priests. Philip II also made speaking Arabic illegal in the kingdom, ordered all Arabic texts to be burned, and banned Moorish attire. After a failed revolt by Morisco leader Aben Humeya (or Ibn Umayyah) in 1568, the Christian monarchs expelled the Moriscos from Spain. Many of these Moriscos headed for North Africa, mainly in Morocco, where many of their descendants settled.
In 1744 the Italian war became serious. Prior to the War of the Spanish Succession (1701–1714) Spain and Austria had been ruled by the same (Habsburg) royal house. Consequently, the foreign policies of Austria and Spain in regards to Italy had a symmetry of interests and these interests were usually opposed to the interests of Bourbon controlled France. However, since the Treaty of Utrecht and the end of the War of the Spanish Succession, the childless last Habsburg monarch (Charles II) had been replaced by the Bourbon grandson of the French king Louis XIV Philip of Anjou, who became Philip V in Spain. Now the symmetry of foreign policy interests in regards to Italy existed between Bourbon France and Bourbon Spain with Habsburg Austria usually in opposition. King Charles Emmanuel of Savoy had followed the long-established foreign policy of Savoy of opposing Spanish interference in northern Italy. Now in 1744, Savoy was faced with a grandiose military plan of the combined Spanish and French armies (called the Gallispan army) for conquest of northern Italy.
In the last decades of the 17th century during the reign of Spain's last Habsburg king, Charles II, despite intermittent conflict between Spain and France, the population increased to approximately 500.000 inhabitants and the Catalan economy recovered. This economic growth was boosted by the export of wine to England and the Dutch Republic, this countries were involved in the Nine Years' War against France, as a consequence, there weren't able to trade with French wine. This new trade caused many Catalans to look to England and, especially, the Netherlands as political and economic models for Catalonia.
The War of the Spanish Succession (1701–1714) was a European conflict of the early 18th century, triggered by the death of the childless Charles II of Spain in November 1700. His closest heirs were members of the Austrian Habsburg and French Bourbon families; acquisition of an undivided Spanish Empire by either threatened the European balance of power.
Elizabeth II is the current longest-reigning monarch, having been Queen of the United Kingdom, Canada, Australia and New Zealand since 6 February 1952. She is also the monarch of 12 other Commonwealth realms which have become independent states since 1952 and is therefore listed multiple times in the table below.
Initially, most of the other powers were willing to accept Anjou's reign as Philip V, but Louis's mishandling of their concerns soon drove the English, Dutch and other powers to join the Austrians in a coalition against France. The War of the Spanish Succession began in 1701 and raged for 12 years. In the end Louis's grandson was recognized as king of Spain, but he was obliged to agree to the forfeiture of succession rights in France, the Spanish Habsburgs' other European territories were largely ceded to Austria, and France was nearly bankrupted by the cost of the struggle. Louis died on 1 September 1715 ending his seventy-two-year reign, the longest in European history.
The reign of Louis XIV was so long that he outlived both his son and eldest grandson. He was succeeded by his great-grandson Louis XV. Louis XV was born on 15 February 1710 and was thus aged only five at his ascension, the third Louis in a row to become king of France before the age of thirteen (Louis XIII became king at 9, Louis XIV at almost 5 and himself at 5). Initially, the regency was held by Philip, Duke of Orléans, Louis XIV's nephew, as nearest adult male to the throne. This "Regence" was seen as a period of greater individual expression, manifested in secular, artistic, literary and colonial activity, in contrast to the austere latter years of Louis XIV's reign.
On 9 September 2015 (at the age of ), Elizabeth II became the longest-reigning British monarch and the longest-reigning female monarch in world history. On 23 May 2016 (at the age of ), her reign surpassed the claimed reign of James Francis Edward Stuart (the "Old Pretender"). On 13 October 2016 (at the age of ), she became the world's longest-reigning current monarch (and the world's longest-serving current head of state) after the death of Bhumibol Adulyadej (Rama IX), King of Thailand.
The longest reign of a British monarch is that of the current monarch, Elizabeth II ( since 6 February 1952). The second longest reign is the 63 years 216 days of Victoria between 1837 and 1901. Queen Elizabeth II's reign became longer than Queen Victoria's on 9 September 2015. The third longest reign (and longest of a King) was that of George III, who reigned for 59 years 96 days between 1760 and 1820.
Charles I of Spain's court was set in Toledo, serving as the imperial capital. In 1560, Toledo reached a population of 60,000, being the 3rd city of the Crown of Castile. However, in 1561, in the first years of his son Philip II of Spain's reign, the Spanish court was moved to Madrid, thus letting the city's importance dwindle until the late 20th century, when it became the capital of the autonomous community of Castile–La Mancha. Nevertheless, the economic decline of the city helped to preserve its cultural and architectural heritage. Today, because of this rich heritage, Toledo is one of Spain's foremost cities, receiving thousands of visitors yearly.
Portugal voluntarily entered a dynastic union between 1580 and 1640. This occurred because the last two kings of the House of Aviz – King Sebastian, who died in the battle of Alcácer Quibir in Morocco, and his great-uncle and successor, King-Cardinal Henry of Portugal – both died without heirs, resulting in the Portuguese succession crisis of 1580.
After Philip II made Madrid the capital city of the Spanish Empire in 1561, the city experienced rapid growth. As Spain (like many other European countries) continued to centralize royal authority, particularly under the Bourbon monarchs, Madrid took on greater importance as a center of administration for Spain. It was sometimes described as an "economic parasite", sucking in the resources of the empire without directly generating wealth.
On July 24, 1580, António proclaimed himself King of Portugal in Santarém, followed by acclamation in several locations throughout the country; his domestic government lasted for 20 days, until he was defeated in the Battle of Alcântara by Habsburg armies led by the Duke of Alba. After the fall of Lisbon, he purported to rule the country from Terceira Island, in the Azores, where he established a government in exile until 1583; António even had coins minted—a typical assertion of sovereignty and royalty. Some authors consider him the last monarch of the House of Aviz (instead of Cardinal-King Henry) and the 18th King of Portugal. His government in Terceira island was only recognized in the Azores, whereas on the continent and in the Madeira Islands power was exercised by Philip II, who was acclaimed king in 1580 as Philip I of Portugal and recognized as official king by the Cortes of Tomar in 1581. The new king's election was carried on condition that the kingdom and its overseas territories should remain separate from Spain and keep their own laws and Cortes.
Franco ruled until his death on 20 November 1975, when control was given to King Juan Carlos. In the last few months before Franco's death, the Spanish state went into a paralysis. This was capitalized upon by King Hassan II of Morocco, who ordered the 'Green March' into Western Sahara, Spain's last colonial possession.
The last Spanish monarchs being solemnly crowned were John I of Castile (1379), Ferdinand I of Aragon (1414), and Eleanor of Navarre (1479). Joan III of Navarre was crowned as late as 1555, although she ruled Navarre beyond the Pyrenees.
In total, nine Stewart/Stuart monarchs ruled Scotland alone from 1371 until 1603. The last ruler of Scotland alone was James VI, who in 1603 became the first dual monarch of England and Scotland. Following the Glorious Revolution in 1688, two Stuart queens ruled the isles: Mary II and Anne. Both were the Protestant daughters of James VII and II by his first wife. They were the great-grandchildren of James VI and I. Their father had converted to Catholicism and his new wife gave birth to a son in 1688, who was brought up a Roman Catholic and preceded his half-sisters; so James was deposed by Parliament in 1689, in favour of his daughters. But neither had any children who survived to adulthood, so under the terms of the Act of Settlement 1701 and the Act of Security 1704, the crown passed to the House of Hanover on the death of Queen Anne in 1714.
To date, he is the last monarch of Spain who died whilst on the throne.