History of Portugal (1834–1910)
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.
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.