During the expansion by Europe into the new world, Brazil was colonized by Portugal, and as a result it is the only Portuguese-speaking country in the Americas. In September 1822, the Prince Regent of Portugal (the son of the Portuguese King) proclaimed himself to be Emperor of Brazil; declaring independence from Portugal and establishing the independent Empire of Brazil. He took the name Dom Pedro I. A treaty between Britain and Portugal recognized the new Empire's independence was signed on August 29, 1825. Pedro I abdicated in 1831 and was succeeded by his son, Pedro II, who was 5 years old at the time. Pedro II was deposed from the throne on November 15, 1889 by a coup d'etat.
More information is provided by Mark Taylor at Gringoes.com
Instrumental to the proclamation of the republic was Manuel Deodoro da Fonseca. Manuel was born in the state of Alagoas, on 5th August 1827. He had a military career and was involved in several battles such as the Praieira revolt in Pernambuco, in 1848, and the War of Cisplatina, which Brazil fought with Paraguay, 1864-1870. Through these military campaigns he rose from the rank of captain, to field-marshal, and then to a full marshal. His courage and competence in battle ensured his visibility as a national figure, and he became Governor of the state of Rio Grande do Sul.
In 1886 the Emperor‘s, Dom Pedro II, government was ordering the arrest of prominent republicans in a political battle over the abolition of slavery. Fonseca went to Rio de Janeiro to command an army faction that favoured abolition. This argument over abolition toppled the Emperor, on 15th November 1889, and Fonseca commanded the military coup that deposed him. Dom Pedro II and his family fled to France.
Fonseca‘s leadership of the coup placed him temporarily as the head of the provisional government while the constitution was drafted. He was then narrowly elected as president, on 26th February 1891.
The government was still divided though between members who supported Fonseca and his vice-president Floriano Peixoto. Peixoto found greater support due to some arbitrary presidential decrees that soured public opinion, and on 3rd November 1891 Fonseca dissolved the National Congress and declared a state of emergency, with the country on the brink of civil war over the political split.
On 23rd November 1891 Fonseca signed his resignation, and turned over the presidency to Floriano. Fonseca died in Rio de Janeiro on 23rd August 1892.