From the House of Braganza restoration in 1640 until the end of the reign of the Marquis of Pombal in 1777, the Kingdom of Portugal was in a transition period. Having been near its height at the start of the Iberian Union, the Portuguese Empire continued to enjoy the widespread influence in the world during this period that had characterized the period of the Discoveries. By the end of this period, however, the fortunes of Portugal and its empire had declined, culminating with the Távora affair, the catastrophic 1755 Lisbon earthquake, and the accession of Maria I, the first ruling Queen of Portugal.

The opulent use of Brazilian gold, the absolutist regime, the movement toward the independence of Brazil, the Methuen Treaty and the Lisbon earthquake contributed to the decline of Portugal's position in Europe and the world. These events, those at the end of the Aviz dynasty, and the period of the Iberian Union forced Portugal to depend more on its colonies, first India and then Brazil. This shift from India to Brazil was a natural consequence of the rise of the Dutch as well as the British Empire. A similar shift occurred after Brazil gained independence, leading Portugal to focus more on its possessions in Africa.

The early 18th century, known as the Pombaline Era after Sebastião José de Carvalho e Melo, Marquis of Pombal, was a period of dictatorship and wide-ranging reforms. The Marquis of Pombal was appointed by Joseph I, who had little inclination to rule. He initiated many reforms intended to modernize the country and attacked the power of the privileged nobility and clergy, notably in the case of the Távora affair and the expulsion of the Jesuits. He was also the leader of the reconstruction of Lisbon after the earthquake in 1755. However, historians also argue that Pombal's "enlightenment," while far-reaching, was primarily a mechanism for enhancing autocracy at the expense of individual liberty and especially an apparatus for crushing opposition, suppressing criticism, and furthering colonial economic exploitation as well as intensifying book censorship and consolidating personal control and profit.Kenneth Maxwell, Pombal, Paradox of the Enlightenment (Cambridge: Cambridge University Press, 1995), 83, 91–108, 160–62.

Soon after the death of Joseph in 1777, his daughter Maria I dismissed Pombal, and prohibited him from coming within 20 miles of her.

Background

The Battle of Alcácer Quibir in 1578 saw both the death of the young king Sebastian and the end of the House of Aviz. Sebastian's successor, the Cardinal Henry of Portugal, was 70 years old. Henry's death was followed by a dynastic crisis, with three grandchildren of Manuel I claiming the throne: Catherine, Duchess of Braganza, who was married to John, 6th Duke of Braganza; António, Prior of Crato; and Philip II of Spain. António had been acclaimed King of Portugal by the people of Santarém on July 24, 1580, followed by many other cities and towns throughout the country. However, Philip II marched into Portugal and defeated the troops loyal to the Prior of Crato in the Battle of Alcântara. Philip II was crowned Philip I of Portugal in 1580 (he was subsequently recognized as official king by the Portuguese Cortes of Tomar in 1581) and the Philippine Dynasty began.

Portugal's status was maintained under the first two kings of the Philippine Dynasty, Philip I and his son Philip II of Portugal and III of Spain. Both monarchs gave excellent positions to Portuguese nobles in the Spanish courts, and Portugal maintained independent laws, currency, and government. However, the joining of the two crowns deprived Portugal of a separate foreign policy, and Spain's enemies became Portugal's. The war with England led to a deterioration of relations with Portugal's oldest ally (since the Treaty of Windsor in 1386) and the loss of Hormuz.

Being united with Spain involved Portugal in the Eighty Years War, Spain's war with the emerging Dutch Republic - which began with the Dutch rebelling against Spanish rule in their own north European territory, but soon developed into the Dutch Republic becoming a major new maritime power and attacking the Spanish colonies. This campaign directly impacted Portuguese colonies as well, many of which were invaded by the Dutch - leading to the Dutch–Portuguese War. In Asia, Portuguese Ceylon (modern Sri Lanka) - where the Portuguese had long controlled the coastal regions (though not the whole island) - was lost to the Dutch, as were Portuguese colonies in the East Indies (today's Indonesia), and commercial interests in Japan. Portuguese colonies in Africa (Mina) and South America were also attacked by the Dutch. Brazil was partially conquered by both France and the Dutch Republic. The Dutch intrusion into Brazil was longer lasting and more troublesome to Portugal. The Dutch captured a large portion of the Brazilian coast including Bahia, Salvador, Recife, Pernambuco, Paraíba, Rio Grande do Norte, Ceará, and Sergipe, while Dutch privateers captured Portuguese ships in both the Atlantic and Indian Oceans.

When Philip II died, he was succeeded by Philip III (and IV of Spain) who took a different approach to Portuguese issues. He raised taxes, which mainly affected Portuguese merchants (Carmo Reis 1987). The Portuguese nobility began to lose its importance at the Spanish Cortes, and government posts in Portugal were occupied by Spaniards. Ultimately, Philip III tried to make Portugal a Spanish province and Portuguese nobles lost all of their power.

This situation culminated in a revolution by the Portuguese nobility and high bourgeoisie on 1 December 1640, 60 years after the crowning of Philip I. The revolution was planned by Antão Vaz de Almada, Miguel de Almeida and João Pinto Ribeiro. They, together with several associates, killed Secretary of State Miguel de Vasconcelos and imprisoned the king's cousin, the Duchess of Mantua, who had governed Portugal in his name. The moment was well chosen, as Spain was fighting the Thirty Years' War and also facing the Catalan Revolt at the time.

The support of the people became apparent almost immediately and soon John, 8th Duke of Braganza, was acclaimed King of Portugal throughout the country as John IV. By December 2, 1640, John was already sending a letter as sovereign of the country to the Town Hall of Évora.

Restoration War The subsequent war with Spain, named the Restoration War, consisted mainly of periodic skirmishes near the border and five significant battles, being the Battle of Montijo on 26 May 1644, the Battle of the Lines of Elvas on 14 January 1659, the Battle of Ameixial on 8 June 1663, the Battle of Castelo Rodrigo 7 July 1664, and the Battle of Montes Claros 17 June 1665; the Portuguese were victorious in all of these battles.

The victories were possible because John IV made several decisions that strengthened the Portuguese forces. On December 11, 1640, he created the Council of War to organize the operations (Mattoso Vol. VIII 1993). Next, the king created the Junta of the Frontiers, to take care of the fortresses near the border, the hypothetical defense of Lisbon, and the garrisons and sea ports. In December 1641, he created a tenancy to assure upgrades on all Portuguese fortresses, paid for with regional taxes. John IV also organized the army, establishing the Military Laws of King Sebastian, and developed an intense diplomatic activity that restored good relations with England.

After several decisive victories, John quickly tried to make peace with Spain. His demand that Spain recognize the legitimacy of Portugal's new ruling dynasty, the House of Braganza, was not fulfilled until the reign of his son Afonso VI during the regency of Peter of Braganza (another son of John and future King Peter II of Portugal).

John IV to John V The Portuguese Royal House of Braganza began with John IV. The Dukes of the House of Braganza were a branch of the House of Aviz created by Afonso V for his half-uncle Afonso, Count of Barcelos, illegitimate son of John I, first monarch of the House of Aviz. The Braganzas soon became one of the most powerful families of the kingdom, and for the next decades married many Portuguese royal family members. In 1565, John, 6th Duke of Braganza married Princess Catherine, granddaughter of King Manuel I. This connection with the Royal Family proved determinant in the rise of the House of Braganza to a Royal House. Catherine was one of the strongest claimants of the throne during the dynastical crisis of 1580 but lost the struggle to her cousin Philip II of Spain. Eventually Catherine's grandson became John IV of Portugal as he was held to be the legitimate heir.

John IV was a beloved monarch, a patron of fine art and music, and a proficient composer and writer on musical subjects. He collected one of the largest libraries in the world (Madeira & Aguiar, 2003). Among his writings is a defense of Palestrina and a Defense of Modern Music (Lisbon, 1649). Abroad, the Dutch took Portuguese Malacca (January 1641) and the Sultan of Oman captured Muscat (1648). By 1654, however, most of Brazil was back in Portuguese hands and had effectively ceased to be a viable Dutch colony. John married his daughter Catherine of Braganza to Charles II of England, offering Tangiers and Bombay as a dowry. John IV died in 1656 and was succeeded by his son Afonso VI.

Afonso VI became King of Portugal when he was thirteen years old. The young king suffered from an illness that paralyzed the left side of his body and left him mentally unstable. After a six-year regency of Luísa de Guzman, the Queen Mother, Afonso assumed the control of the country. His reign was short due to a conspiracy of his wife, Queen Marie Françoise of Savoy, who joined with Afonso's brother, Prince Peter, to secure an annulment of her marriage to the king in 1667 based on his impotence. Peter later married Marie Françoise. In the same year, Peter managed to gain enough support to force the king to relinquish control of the government and to name him Prince Regent.

Peter continued as Prince Regent but de facto ruler of Portugal for the next 16 years. When Afonso died in 1683, Peter succeeded him as Peter II of Portugal. Peter II is considered the first absolutist monarch of Portugal. He dismissed the historic legislative Portuguese Cortes in 1697 and ruled alone. He encouraged the focusing of Portuguese exploration of Brazil after silver was found in the territory. Peter's reign also saw the signing of the Methuen Treaty of trade with England.

Peter was succeeded by his son John V in 1706. An admirer of Louis XIV, John maintained a lavish court paid for by the riches of Brazil and ruled as an absolutist king, ignoring the Cortes (which had only convened sporadically since 1640) and personally appointing ministers. His cognomens were "the Magnanimous", "the Magnificent" or "the Portuguese Sun-King" and he is perhaps the best example of an absolutist monarch in Portugal. His long reign was characterized by a strengthening of the king's powers, made possible by the large revenues flowing to Portugal from Brazil.

John V used the crown's treasure to develop Portugal's weakened economy by creating new manufactures across the country; however, the majority of the investment was used to patronize the arts and intellectuals and regain Portugal's lost prestige among its European neighbors (Carmo Reis 1987). His foreign policy followed two simple rules: political neutrality in European conflicts, and attempts to increase his prestige in Rome. The title "Most Faithful Majesty" was eventually bestowed upon John V and his successors by a papal bull.