Instruct: Given a question, retrieve relevant passages that can help answer the question.
Query: Who was the last King of Portugal?
"Dom" Manuel II (15 November 1889 – 2 July 1932), "the Patriot" () or "the Unfortunate" (), was the last King of Portugal, ascending the throne after the assassination of his father, King Carlos I, and his elder brother, Luís Filipe, the Prince Royal. Before ascending the throne he held the title of Duke of Beja. His reign ended with the dissolution of the monarchy in the 5 October 1910 revolution, and Manuel lived the rest of his life in exile in Twickenham, South London.
King Carlos I of Portugal confirmed colonial treaties of the 19th century that stabilized the situation in Portuguese Africa. These agreements were, however, unpopular in Portugal, where they were seen as being to the disadvantage of the country. In addition, Portugal was declared bankrupt twice—first on 14 June 1892 and again on 10 May 1902—causing industrial disturbances, socialist and republican antagonism, and press criticism of the monarchy. Carlos responded by appointing João Franco as Prime Minister and subsequently accepting Parliament's dissolution. In 1908, Carlos I was assassinated in Lisbon. The Portuguese monarchy lasted until 1910 when, through the 5 October revolution, it was overthrown and Portugal was proclaimed a republic. The overthrow of the Portuguese monarchy in 1910 led to a 16-year struggle to sustain parliamentary democracy under republicanism – the Portuguese First Republic (1910–1926).
With the death of the Cardinal-King Henry (1578–1580), Philip II of Spain inherited the Kingdom of Portugal, initiating a personal union of the crowns that would last until 1640. During this period, Portuguese political power moved from Sintra to Vila Viçosa, principal centre of the House of Braganza, whose dukes, descendents of John of Portugal, were heirs to the throne of Portugal. Following the decision of the "Cortes" of Tomar in 1581, Phillip as King of Portugal accepted an administration composed of the Portuguese aristocracy. He passed through Sintra around October 1581, visiting the monasteries and churches. It was during this period that cult of Sebastianism, the hope for the return of King Sebastian, came to an end, when several fake "Sebastians" were denounced. In 1585 Mateus Alvares, born on the island of Terceira in the Azores and guardian of the hermitage of São Julio, passed himself off as King Sebastian and created conflict in Sintra, Madra, Rio de Mouro and Ericeira. The Sebastian adventure ended with the hanging of thirty people and the suffering of many more. It was not surprising, therefore, that the visit in 1619 by King Phillip IV of Spain (Phillip III of Portugal) resulted in many families escaping to the hills. During this union (1580–1640), Sintra was a privileged place for Portuguese "exiles" from the Castilian court; nobles who wished to distance themselves from Spanish nobility would purchase lands in the region, away from court intrigue. At the time of the Restoration, in 1640, the municipality had approximately 4000 residents.
The United Kingdom of Portugal, Brazil and the Algarves came into being in the wake of Portugal's war with Napoleonic France. The Portuguese Prince Regent, the future King John VI, with his incapacitated mother, Queen Maria I of Portugal and the Royal Court, escaped to the colony of Brazil in 1808.
With the defeat of Napoleon in 1815, there were calls for the return of the Portuguese Monarch to Lisbon; the Portuguese Prince Regent enjoyed life in Rio de Janeiro, where the monarchy was at the time more popular and where he enjoyed more freedom, and he was thus unwilling to return to Europe. However, those advocating the return of the Court to Lisbon argued that Brazil was only a colony and that it was not right for Portugal to be governed from a colony. On the other hand, leading Brazilian courtiers pressed for the elevation of Brazil from the rank of a colony, so that they could enjoy the full status of being nationals of the mother-country. Brazilian nationalists also supported the move, because it indicated that Brazil would no longer be submissive to the interests of Portugal, but would be of equal status within a transatlantic monarchy.
After the disaster of the Battle of Ksar El Kebir, where heirless King Sebastian of Portugal died, the aged Cardinal Henry of Portugal had become King. Because Henry was old and was not allowed to have legitimate children, a dynastical crisis occurred even before the death of the Cardinal. The Duke of Braganza supported his wife's claim to the throne (she was a granddaughter of King Manuel I). Philip II of Spain (another grandson of Manuel I and also claimant to the throne), tried to bribe him to abandon his wife's pretensions, offering him the Vice-Kingdom of Brazil, the post of Grand-Master of the Order of Christ, a license to send a personal ship to India every year, and the marriage of his eldest son Teodósio of Braganza to one of his daughters (either Isabella Clara Eugenia or Catherine Michelle). The Duke of Braganza, influenced by his wife, refused the proposal.
The current President of Portugal is Marcelo Rebelo de Sousa, who took office on 9 March 2016.
Although he counted on the support of the majority of the Portuguese aristocracy, King John I couldn't repeat the Castilian triumphs of the Fernandine Wars and failed before Coimbra and Lisbon. On 3 September 1384 he left garrisons in the cities of his supporters, returned to Castile and asked for help to the King of France. Beatrice also left Portugal for what turned out to be the last time. Meanwhile, the Master of Aviz attempted to seize loyal cities from his adversaries, and although he took Almada and Alenquer, he failed in Sintra, Torres-Novas and Torres Vedras. He then went to Coimbra, where he had summoned Cortes for March 1385. There, Beatrice was declared illegitimate because the marriage of her parents was considered invalid, and on 6 April they proclaimed the Master of Aviz as King John I of Portugal. After the Cortes, the new sovereign undertook a campaign to control the north of the Kingdom, and thus obtained Viana do Castelo, Braga and Guimarães. John I of Castile again entered Portugal, this time via Ciudad Rodrigo and Celorico, but his army's defeats at Trancoso and Aljubarrota in May and August 1385 represented the end of any chance to impose himself as King of Portugal.
The assassination of King Carlos and the Prince Royal was the effective end of a constitutional monarchy in Portugal (later confirmed by the 5 October 1910 revolution). The regime functioned for another 33 months with growing agitation and demands for reform (although considerably less than in the future First Republic). It cannot be denied that the weak and permissive attitude in the Government of Acclamation was an incentive for the Republican Party to attempt another coup. The assassinations did not change the system of government; instead, they delayed the change.
With King John II's death, in 1495, his cousin, Manuel I, Duke of Beja and Viseu, succeeded King John II as King Manuel I of Portugal. King Manuel I's personal monopoly on the spice trade allowed the King to be a great patron of the arts, constructing numerous palaces, convents, and churches throughout the country. King Manuel I took a great interest in Évora, establishing his court there on various occasions. From 1502 to 1520, King Manuel I ordered a vast series of renovations, constructions, and enlargements. During the Manueline Campaigns, as the works are collectively known as, the palace grew to one of the largest palaces in Iberia. Through architects Martim Lourenço, Álvaro Anes, and António de Lagoa the Manuline Campaign saw the construction of Couto Hall, the Wing of the Infantes, an infirmary, the Royal Gardens and Hunting Grounds, the Royal Library, and the Gallery of Dames, which is the only part of the palace to survive to present day. Alongside expansion of the palace, King Manuel I also renovated the existing parts of the palace, remodeling the Queen's Hall, the servants quarters, and the Rossio of the Palace. In 1519, King Manuel I ordered architect André Pires to turn the plain Hall of Ambassadors into a Manueline Throne Room, which would direct itself towards the Palace Rossio.
Philip II, through his mother Isabella of Portugal also a grandson of Manuel I, did not recognize Antonio as king of Portugal. 
The king appointed Fernando, Duke of Alba, as captain general of his army. The duke was 73 years old and ill at the time. Fernando mustered his forces, estimated at 20,000 men, in Badajoz, and in June 1580 crossed the Spanish-Portuguese border and moved to Lisbon. In late August he defeated a Portuguese army at the Battle of Alcântara and entered Lisbon. This cleared the way for Philip II who became Philip I of Portugal, and created a dynastic union spanning all of Iberia under the Spanish crown.
King Roderic (Rodrigo) was killed while opposing this invasion, thus becoming the last Visigothic king of Iberia.
From the various Germanic groups who settled in Western Iberia, the Suebi left the strongest lasting cultural legacy in what is today Portugal, Galicia and Asturias.
Militant Republicans and their allies in the Carbonária were not willing to remain in the shadows of the constitutional monarchy. Between 4–5 October 1910, members of the Carbonária, republican youth, and elements of the army instigated a coup d'état against the already weak constitutional monarchy. The young king and his family, after a few miscues, escaped from the Palace in Mafra to exile in England. On the morning of 5 October 1910, the Republic was declared from the balcony of Lisbon City Hall, ending eight centuries of monarchy in Portugal.
The current President of Portugal is Marcelo Rebelo de Sousa, the winner of the 2016 presidential election.
When Napoleon was defeated in 1815, the European powers held the Congress of Vienna to reorganize the political map of the continent. Portugal participated in these negotiations, but given British machinations contrary to the interests of the House of Braganza, Portugal's ambassador to the Congress, the Count of Palmela, counseled the regent to remain in Brazil, as did the powerful Prince Talleyrand, in order to strengthen the ties between metropolis and colony, including the suggestion to elevate Brazil to the condition of a kingdom united to Portugal. The representative of the United Kingdom also ended up supporting the idea, which resulted in the effective foundation of the United Kingdom of Portugal, Brazil and the Algarves on , a juridical institution rapidly recognized by other nations.
Slavery in Portugal occurred since before the country's formation. During the pre-independence period, inhabitants of the current Portuguese territory were often enslaved and enslaved others. After independence, during the existence of the Kingdom of Portugal, the country played a leading role in the Atlantic Slave Trade, which involved the mass trade and transportation of slaves from Africa and other parts of the world to the American continent. Slavery was abolished in Portugal in 1761 by the Marquês de Pombal. After the abolishment of slavery in Portugal, the Portuguese slave traders turned to clients in other countries where slavery was not yet abolished such as the United States of America.
On 11 January 1890, the United Kingdom issued the 1890 British Ultimatum demanding that Portugal refrain from occupying land lying between the Portuguese colonies of Angola, on the west coast of Africa, and Mozambique, on the east coast, thereby forming one contiguous polity (as proposed on the Pink Map). Despite a popular uproar, the Portuguese government was forced to accept the U.K.'s demands. This contributed to the unpopularity of King Carlos I and the monarchy, and it garnered support for the increasingly popular republican movement in Portugal.
The complete list of Presidents of the Portuguese Republic consists of the 20 heads of state in the history of Portugal since the 5 October 1910 revolution that installed a republican regime. This list includes not only those persons who were sworn into office as President of Portugal but also those who "de facto" served as head of state since 1910. This is the case of Teófilo Braga who served as President of the Provisional Government after the republican coup d'état. Also Sidónio Pais, Mendes Cabeçadas, Gomes da Costa, as well as Canto e Castro and Óscar Carmona in their early months, were not sworn into office as the President of the Republic, usually being the President of the Ministry (Prime Minister), but "de facto" accumulation this functions with that of the Head of State. See the notes for more information.
King Dinis of Portugal, who also contributed (with 137 extant texts, more than any other author) to the secular poetic genres, made the language official in Portugal in 1290. Until then, Latin had been the official (written) language for royal documents; the spoken language did not have a name and was simply known as "lingua vulgar" ("ordinary language", that is Vulgar Latin) until it was named "Portuguese" in King Dinis' reign. "Galician-Portuguese" and "português arcaico" ("Old Portuguese") are modern terms for the common ancestor of modern Portuguese and modern Galician. Compared to the differences in Ancient Greek dialects, the alleged differences between 13th-century Portuguese and Galician are trivial.
Manuel's mother was the granddaughter of King John I of Portugal, whereas his father was the second surviving son of King Edward of Portugal and the younger brother of King Afonso V of Portugal. In 1495, Manuel succeeded his first cousin, King John II of Portugal, who was also his brother-in-law, as husband to Manuel's sister, Eleanor of Viseu.
Throughout the 17th century, the increasing predations and beleaguering of Portuguese trading posts in the East by the Dutch, English and French, and their rapidly growing intrusion into the Atlantic slave trade undermined Portugal's near monopoly on the lucrative oceanic spice and slave trades. This sent the Portuguese spice trade into a long decline. To a lesser extent, the diversion of wealth from Portugal by the Habsburg monarchy to help support the Catholic side of the Thirty Years' War also created strains within the union, although Portugal did benefit from Spanish military power in helping to retain Brazil and in disrupting Dutch trade. These events, and those that occurred at the end of the House of Aviz and the period of the Iberian Union, led Portugal to a state of dependency on its colonies, first India and then Brazil.
Spain's world empire reached its greatest territorial extent in the late 18th century but it was under the Habsburg dynasty in the 16th and 17th centuries it reached the peak of its power and declined. The Iberian Union with Portugal meant that the monarch of Castile was also the monarch of Portugal, but they were ruled as separate entities both on the peninsula and in Spanish America and Brazil. In 1640, the House of Braganza revolted against Spanish rule and reasserted Portugal's independence.
The House of Aviz, an illegitimate branch of its predecessor the House of Burgundy, ruled Portugal from 1385 to 1580; its last member was "Henrique, Cardinal-King of Portugal" (1512–1580), who succeeded his grand-nephew King Sebastian late in life. António, Prior of Crato would briefly rule Portugal shortly thereafter, but his illegitimate birth contests his claim to be considered a member of the House of Aviz.
Cardinal Henry ( ; 31 January 1512 – 31 January 1580) was King of Portugal and the Algarves and a cardinal of the Roman Catholic Church. He ruled Portugal between 1578 and 1580 and was known as "Henry the Chaste" (Portuguese: "Henrique o Casto") and the "Cardinal-King". As a clergyman, he was bound to chastity, and as such, had no children to succeed him, and thus an end to the Royal House of Aviz. His death led to the Portuguese succession crisis of 1580 and ultimately to the 60-year Iberian Union that saw Portugal share a monarch with that of Spain. The next independent monarch of Portugal would be John IV, who took the throne after 60 years of Spanish rule.
Nuno Mendes or Nuño Menéndez (died February 1071) was the last Count of Portugal from the family of Vímara Peres. The son of Count Mendo Nunes (Menendo Núñez), his desires for greater autonomy for Portugal led him to face King Garcia II of Galicia. On 18 February 1071 he fought in the Battle of Pedroso, near the Monastery of São Martinho de Tibães, and his defeat and death led the winning Garcia II to call himself King of Galicia and Portugal. The County of Portugal was then subsumed into the crowns of Galicia and León until regranted by King Alfonso VI of León and Castile a quarter-century later.
The House of Aviz (modern Portuguese: Avis; ) known as the Joanine Dynasty was the second dynasty of the kings of Portugal. In 1385, the Interregnum of the 1383-1385 crisis ended when the Cortes of Coimbra proclaimed the Master of the monastic military Order of Aviz as King John I. John was the natural (illegitimate) son of King Peter I and Dona Teresa Lourenço, and so was half-brother to the last king of the Portuguese House of Burgundy or "Afonsine Dynasty", Ferdinand I of Portugal. The House of Aviz continued to rule Portugal until Philip II of Spain inherited the Portuguese crown with the Portuguese succession crisis of 1580.