Brazil's story begins with its indigenous peoples, hundreds of distinct groups who had inhabited the region for thousands of years before European contact. Portuguese explorers arrived in 1500, and over the following three centuries Brazil developed into the crown jewel of Portugal's colonial empire, built first on sugar plantations and later on gold and diamond mining, both economies sustained by the forced labor of enslaved Africans on a massive scale.

Brazil broke from Portugal in 1822, becoming an independent empire under Emperor Pedro I rather than following the republican revolutions common elsewhere in Latin America. Slavery persisted longer in Brazil than almost anywhere else in the Americas, not abolished until 1888, the last country in the Western Hemisphere to do so.

The monarchy fell in 1889, replaced by a republic, and the 20th century brought recurring cycles of civilian and military rule, including a two-decade military dictatorship from 1964 to 1985. Brazil returned to democracy in 1985 and has held regular civilian elections since, alongside major economic transformation into a global agricultural and industrial power.