Brazil country profile
Brazil is South America's most influential country, a rising economic power and one of the world's biggest democracies.
Over the past few years it has made major strides in its efforts to raise millions out of poverty, although the gap between rich and poor remains wide.
The exploitation of the Amazon rainforest, much of which is in Brazil, has been a major international worry, since the wilderness is a vital regulator of the climate.
A former Portuguese colony, Brazil has a highly diverse population, including indigenous Americans and the descendants of African slaves and European settlers.
Federative Republic of Brazil
Capital: Brasilia (largest city: Sao Paulo)
Population 198.3 million
Area 8.55m sq km (3.3m sq miles)
Major language Portuguese
Major religion Christianity
Life expectancy 71 years (men), 77 years (women)
President: Michel Temer
Michel Temer was sworn in as president in August 2016 after senators voted to remove Dilma Rousseff from office over financial irregularities.
His inauguration brought to an end the 13-year rule of Ms Rousseff's left-wing Workers' Party.
A veteran of the centrist Brazilian Democratic Movement Party (PMDB), Mr Temer will serve out the rest of Ms Rousseff's term to the end of 2018.
Once political allies, Mr Temer served as vice-president in Ms Rousseff's government for over five years before playing a key role in impeachment proceedings against her. He acted as interim president during her trial.
In his first televised cabinet meeting following his inauguration, Mr Temer pledged to bring back "political stability" to the recession-stricken country.
"My only interest is in handing over to my successor a country that is reconciled, pacified and growing economically," he said.
Descriptions of his public persona have ranged from "a good negotiator" to "conspirator", and Mr Temer has himself been implicated in corruption scandals. The former law professor is married, and has five children with three women.
- Read full profile
South America's biggest media market is home to thousands of radio stations and hundreds of TV channels. TV has long been the most influential medium.
Media ownership is highly concentrated. Domestic conglomerates such as Globo, Brazil's most-successful broadcaster, dominate the market and run TV and radio networks, newspapers and pay-TV operations.
The constitution guarantees a free press and there is vigorous debate in the media on social and political issues.
- Read full media profile
1500 - Portuguese land in the area and claim it for the Portuguese crown.
1822 - The son of the Portuguese king declares independence from Portugal and crowns himself Pedro I, emperor of Brazil.
1888 - Slavery is abolished. A year later, Brazil's monarchy is overthrown and a federal republic is established; in subsequent decades, government is dominated by European coffee plantation owners.
1930 - Nationalist and anti-communist Getulio Vargas comes to power in a coup; his 15-year authoritarian rule pursues state-led industrialisation and improvements in social welfare.
1945 - Vargas toppled by a coup that restores democratic rule and ushers in the second Brazilian Republic.
1960 - The capital is moved from Rio de Janeiro to the new purpose-built city of Brasilia.
1964 - Left-wing President Joao Goulart is ousted in a coup that commences two decades of military rule; the regime stifles freedom of speech and tortures opponents while pursuing economic development.
1985 - Return of civilian government.
2002 - Luiz Inacio Lula da Silva, popularly known as Lula, wins elections to become Brazil's first left-wing president for more than 40 years.
2016 - Lula's ally and successor Dilma Rousseff - is removed as president after an impeachment trial finds her guilty of financial irregularities.
- Read full timeline