In 1500 Pedro Alvares Cabral discovers the coastal regions of present-day Brazil and claims it for Portugal. Between 1532 and 1549 Portugal establishes the colony of Brazil. Between 1580 and 1640 Brazil is with Portugal Spanish, but at the end of this period, between 1630 and 1654, the Netherlands seize parts of the north-east regions of Brazil. Portuguese rule is restored in 1640 respectively 1654. In 1714 Brazil becomes the Portuguese Viceroyalty of Brazil. During the Napoleonic wars, in 1808, Portugal replaces its royal see to Brazil. In 1815 Brazil becomes as Kingdom of Brazil a constituent part of the United Kingdom of Portugal, Brazil and Algarve. It incorporates in 1821 Uruguay into Brazil. In 1921 the king returns to Portugal and a year later his son Pedro I proclaims the independent Empire of Brazil. Uruguay secedes from Brazil in 1828. Pedro I is succeeded in 1831 by Pedro II, who rules the country until 1889. In the last decades of his rule abolition of slavery is high on the agenda. Slavery is abolished in 1888.

In 1889 republicans work together with the military and after a coup Brazil becomes a republic named United States of Brazil under Manuel Deodoro da Fonseca. He has to resign in 1891 in favour of his vice-president, Floriano Vieira de Araújo Peixoto. The new republic is strongly anti-clerical and universal male suffrage is introduced. De facto the government is still under military control. The country is ruled by the military and oligarchists with a constitutional government and a facade of democracy in which the presidency alternates between the dominant states of Sao Paulo and Minas Gerais. Peixoto is succeeded by the civilian Prudente José de Morais Barros in 1894 and by Manuel Ferraz de Campos Sales in 1898. In 1902 Francisco de Paula Rodrigues Alves becomes president, succeeded by Afonso Augusto Moreira Pena. Under these four presidents, representing the Partido Republicano Paulista (Republican Party of the state of São Paulo, PRP) and Moreira the Partido Republicano Mineiro (Republican Party of the state of Minas Gerais, PRM), Brazil has civilian rule and stability. After the death of Moreira in 1909 Nilo Peçanha takes over the presidency. During the presidency of the military Hermes Rodrigues da Fonseca (1910-1914) it comes to rebellions. He is succeeded in 1914 by civilian Venceslau Brás Pereira Gomes of the PRM. In 1919 Epitâcio da Silva Pessoa becomes president, suceeded in 1922 by Artur da Silva Bernardes. Just before his inauguration da Silva Pessoa resists a military coup. The country is very unstable and victim of the economic crisis. In 1926 Washington Luís Pereira de Sousa becomes president, ending the rule of the PRM, replacing it by the PRP. Under his rule the economic crisis strengthens.

After a military supported people's revolt in 1930 Getúlio Dornelles Vargas gets with the support of the Aliança Liberal (Liberal Alliance, AL) power as elected president. He abolishes all parties and becomes dictator in 1937. Under influence of the victory of democratic countries in World War II, the army replaces the dictatorship by a democracy in 1945. José Linhares becomes acting president, but the first elections are won in 1946 by Gaspar Dutra of the conservative Partido Social Democrático (Social Democratic Party, PSD). Vargas is re-elected in 1950 as the candidate of the Partido Trabalhista Brasileiro (Brazilian Labour Party, PTB). In 1954 the army stages a coup, but it doesn't lead to a dictatorship and more or less democratic institutions are introduced. In 1956 Juscelino Kubitschek de Oliveira of the PSD with the support of the PTB becomes president. Kubitschek is succeeded in 1961 by Jânio Quadros of the conservative União Democrática Nacional (National Democratic Union, UDN), who had won the 1960 elections. João Belchor Marques Goulart of the PTB becomes vice-president. Qaudros resigns later that year. Goulart becomes president, but has accept a prime minister.

After a referendum in 1963 Brazil becomes a presidential republic again. Again a military coup makes an end to democracy in 1964. Humberto de Alencar Castelo Branco (1964-1967) becomes dictator. The regime creates an artificial two-party system with the Aliança Renovadora Nacional (National Renewal Alliance, ARENA) and the oppositional Movimento Democrático Brasileiro (Brazilian Democratic Movement, MDB). The country is renamed Federative Republic of Brazil in 1967 and Arthur da Costa e Silva becomes president. Da Costa e Silva suffers a stroke in 1969 and is succeeded by Emílio Garrastazu Médici. He is confirmed in the 1969 elections and is succeeded in 1974 by Ernesto Geisel and in 1979 João Baptista de Oliveira Figuerido. Under Geisel and Figuerido a transfer to democracy is started. In 1985 Brazil becomes a presidential parliamentary democracy with a multiparty system.

In an indirect election, the candidate of the MDB, Tancredo de Almeida Neves, is elected president, but he dies before inauguration. His vice-presidential candidate, José Sarney of the Partido da Frente Liberal (Liberal Front Party, PFL) becomes president. The first elections are won by an alliance of the Partido do Movimento Democrático Brasileiro (Party of the Brazilian Democratic Movement, PMDB) and the Partido da Frente Liberal (Liberal Front Party, PFL). José Sarney, candidate of the PFL, is elected by parliament as president in 1985. At the elections of 1986 the Partido do Movimento Democrático Brasileiro (Party of the Brazilian Democratic Movement, PMDB), continuation of the MDB, becomes the largest party. The elections of 1990 are surprisingly won by Fernando Collor de Mello of the conservative Partido de Renovacão Nacional (National Renewal Party, PRN). He is impeached in 1992 by parliament and succeeded by Itamar Franco. In 1994 the PMDB becomes the largest party in parliament again, as it did in 1990, but Fernando Henrique Cardoso of the Partido da Social Democracia Brasileira (Party of the Brazilian Social Democracy, PSDB) becomes president with the support of the PMDB. In 1998 Cardoso is reelected with the support of the PMDB, PSDB and PFL. The elections of 2002 are won by Luíz Inácio (Lula) da Silva of the Partido dos Trabalhadores (Workers' Party, PT). He is Brazil's first working-class president.