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.
History of colonialism
Brazil was the only country in Latin America to gain its independence without bloodshed. The invasion of Portugal by Napoleon in 1808 had forced King João VI to escape to Brazil and establish his court in Rio de Janeiro. For thirteen years, Portugal was ruled from Brazil (the only instance of such a reversal of roles between colony and metropole) until his return to Portugal in 1821. His son, Dom Pedro, was left in charge of Brazil and in 1822 he declared independence from Portugal and himself the Emperor of Brazil. Unlike Spain's former colonies which had abandoned the monarchy in favour of republicanism, Brazil therefore retained its links with its monarchy, the House of Braganza.