Excerpts from Books and Wikipedia
In 1807 after Napoleon's invasion, the future Joao VI of the Braganza dynasty was acting as regent for his mentally ill mother, Queen Maria. They left Portugal and took the royal treasury to Brazil, settling in Rio de Janeiro. Queen Maria died in 1816 and Joao returned to Portugal in 1821 leaving his son Pedro as regent of Brazil. Pedro was called to return to Portugal, but instead, he declared the independence of Brazil. Pedro lost favor and abdicated. His son Pedro II was later declared emperor, and the monarchy was prosperous until 1889 when Brazil became a republic. [Furtado: 1001 Days] "Brazil had retained a European dynasty; a nobility of dukes, counts, and barons sporting coats of arms; a tight relationship between church and state; and a full commitment to the institution of chattel slavery, in which some people worked others to death. On the other hand, despite a few attempts to form breakaway republics, Portuguese America remained united, and the Brazilian government had never been violently overthrown. The Brazilian elite was extremely proud of this achievement and fond of contrasting Brazil to revolution-wracked Spanish America." [Born in Blood & Fire, 4th Ed., p. 139]