structural:expansion, information:classification, information:highlighting, information:extraction, linguistic:translation
Brazil, officially the Federative Republic of Brazil, is the largest and easternmost country in South America and Latin America. It is the world's fifth-largest country by area and the seventh most populous. Its capital is Brasília, and its most populous city is São Paulo. Brazil is a federation composed of 26 states and a Federal District. It is the only country in the Americas where Portuguese is an official language. Brazil is among the world's most multicultural and ethnically diverse nations, due to over a century of mass immigration from around the world.

Bounded by the Atlantic Ocean on the east, Brazil has a coastline of 7,491 kilometers (4,655 mi). Covering roughly half of South America's land area, it borders all other countries and territories on the continent except Ecuador and Chile. Brazil's 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 positions Brazil at number one of 17 megadiverse countries. The country's natural richness is also the subject of significant global interest, as environmental degradation (through processes such as deforestation) has direct impacts on global issues such as climate change and biodiversity loss.

The territory of present-day Brazil was inhabited by numerous tribal nations prior to the landing of explorer Pedro Álvares Cabral in 1500. Subsequently claimed by the Portuguese Empire, Brazil 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. Independence was achieved in 1822 with the creation of the Empire of Brazil, a unitary state governed under a constitutional monarchy and a parliamentary system. The ratification of the first constitution in 1824 led to the formation of a bicameral legislature, now called the National Congress. Slavery was abolished in 1888. The country became a presidential republic in 1889 following a military coup d'état. An authoritarian military dictatorship emerged 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. Due to its rich culture and history, the country ranks thirteenth in the world by number of UNESCO World Heritage Sites.

Brazil is a regional and middle power that is an emerging power and a major non-NATO ally of the United States. Categorized as a developing country and ranking 89th on the Human Development Index, Brazil is considered an advanced emerging economy, having the eighth largest GDP in the world in both nominal and PPP terms—the largest in Latin America and the Southern Hemisphere. Classified as an upper-middle income economy by the World Bank, and a newly industrialized country by the IMF, Brazil has the largest share of wealth and the most complex economy in South America. It is also one of the world's major breadbaskets, being the largest producer of coffee for the last 150 years. Despite its growing economic and global profile, the country continues to face high levels of corruption, crime and social inequality. Brazil is a founding member of the United Nations, the G20, BRICS, G4, Mercosul, Organization of American States, Organization of Ibero-American States and the Community of Portuguese Language Countries. Brazil is also an observer state of the Arab League.