Brazil (Portuguese: Brasil; Brazilian Portuguese: [bɾaˈziw]), officially the Federative Republic of Brazil, is the largest country in both South America and Latin America. It covers an area of 8,515,767 square kilometres (3,287,956 sq mi), with a population of over 211 million. Brazil is the world's fifth-largest and sixth-most populous country, composed of 26 states and the Federal District. It is the largest country to have Portuguese as an official language and the only one in the Americas. Brazil is one of the world's most multicultural and ethnically diverse nations, due to over a century of mass immigration from around the world. It is also the most populous Roman Catholic-majority country, and its capital is Brasília, while the largest city is São Paulo.
Brazil is bounded by the Atlantic Ocean to the east, and has a coastline of 7,491 kilometers (4,655 mi). It covers roughly half of South America's landmass, and borders all other countries in the continent except Ecuador and Chile. Its Amazon basin includes a vast tropical forest, home to diverse wildlife, a variety of ecological systems, and extensive natural resources spanning numerous protected habitats. This unique environmental heritage makes Brazil one of the seventeen megadiverse countries, and is the subject of significant global interest, as environmental degradation through processes like deforestation has direct impacts on global issues like climate change and biodiversity loss.
Brazil was inhabited by numerous tribal nations prior to the landing in 1500 of explorer Pedro Álvares Cabral, who claimed the area for the Portuguese Empire. It remained a Portuguese colony until 1808 when the capital of the empire was transferred from Lisbon to Rio de Janeiro. In 1815, the colony was elevated to the rank of kingdom upon the formation of the United Kingdom of Portugal, Brazil and the Algarves. In 1822, Brazil achieved independence with the creation of the Empire of Brazil. The ratification of the first constitution in 1824 led to the formation of a bicameral legislature, now called the National Congress. The country became a presidential republic in 1889 following a military coup d'état. An authoritarian military junta came to power in 1964 and ruled until 1985, after which civilian governance resumed. Brazil's current constitution, formulated in 1988, defines it as a democratic federal republic.
Brazil is a regional power and a middle power in international affairs, ranking high in the Human Development Index. It is a newly industrialized country, with the largest share of global wealth in Latin America. Brazil's economy is the world's thirteenth-largest by nominal GDP and the eighth-largest by PPP. It is one of the world's major breadbaskets, being the largest producer of coffee for the last 150 years. On account of its international recognition and influence, the country is subsequently classified as an emerging power. However, the country maintains high amounts of corruption and crime, having the highest amount of recorded murders in 2018.
Brazil is a founding member of the United Nations, the G20, BRICS, Mercosul, Organization of American States, Organization of Ibero-American States and the Community of Portuguese Language Countries. It is also home to the world's thirteenth-highest number of UNESCO World Heritage Sites.