Kingdom of Portugal
After the Portuguese Restoration War of 1640–1668, the kingdom passed to the House of Braganza and thereafter to the House of Braganza-Saxe-Coburg and Gotha. From this time, the influence of Portugal declined, but it remained a major power due to its most valuable colony, Brazil. After the independence of Brazil, Portugal sought to establish itself in Africa, but was ultimately forced to yield to the British interests, leading to the collapse of the monarchy in the 5 October 1910 revolution and the establishment of the First Portuguese Republic.
Palace of Queluz
Following the death of Carlotta Joaquina, Queluz saw only intermittent use as a royal residence and was not again the primary residence of Portuguese royalty. Carlotta Joaquina's son King Miguel used the palace during the three-year civil war which he fought against his brother King Pedro IV, before being forced by his brother in 1834 to abdicate and go into exile. A year later, Pedro IV died of tuberculosis at the age of 35 at Queluz, the palace of his birth. Pedro I's daughter Maria II ruled until her death in 1853 and was succeeded by her son Pedro V. Following his untimely death in the cholera epidemic of 1861, the throne passed to his brother Luís. From this time the royal family lived chiefly at the rebuilt Ajuda Palace in Lisbon. On the assassination of Luís' son Carlos I in 1908, the palace passed into the ownership of the state. Portugal was in the turmoil of revolution and the monarchy fell two years later.