1763 Rio de Janeiro becomes the capital of Brazil. This portrait shows Emperor Dom Pedro II of Brazil as he appeared around 1870. 1822 Pedro I declares Brazil's independence from Portugal. 1840 Dom Pedro II becomes emperor of Brazil. After freeing all slaves in 1888, Pedro II is forced to give up his throne by military forces.
Brazil is declared a republic.
1890s Coffee becomes Brazil's most important crop. The boom in coffee production brings a wave of almost one million European immigrants during the 19th century. 1894 Prudente de Morais is the first elected civilian President. Brazil declares war on Germany. A huge road construction project encourages people to settle in the Amazon region of Brazil.