Brazil. Brazil, officially the Federative Republic of Brazil, is the largest country in both South America and Latin America. At 8.5 million square kilometers and with over 214 million people, Brazil is the world's fifth-largest country by area and the seventh most populous. Its capital is Brasilia, and its most populous city is Sao Paulo. The federation is composed of the union of the 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; one of the most multicultural and ethnically diverse nations, due to over a century of mass immigration from around the world; and the most populous Roman Catholic-majority country. Bounded by the Atlantic Ocean on the east, Brazil has a coastline of 7,491 kilometers. It borders all other countries and territories in South America except Ecuador and Chile and covers 47.3% of the continent's land area. 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 17 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. The territory which would become known as Brazil was inhabited by numerous tribal nations prior to the landing in 1500 of explorer Pedro Alvares Cabral, who claimed the discovered land for 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.