Rio de Janeiro, or simply Rio, is the second-most populous city in Brazil and the sixth-most populated metropolis in the Americas, with a population of over 20 million. Rio de Janeiro is the capital of the city of Rio de Janeiro, which is Brazil's third-most populated state after São Paulo and Minas Gerais. Rio de Janeiro is the world's most visited city. On July 1, 2012, the United Nations Educational, Scientific, and Cultural Organization (UNESCO) recognised a section of the city as a Cultural Landscape, naming it "Rio de Janeiro: Carioca Landscapes between the Mountain and the Sea."
The city of Rio de Janeiro was founded by the Portuguese in 1565 and served as the capital of the Captaincy of Rio de Janeiro, which was a province of the Portuguese Empire at the time. Later, in 1763, it was designated as the capital of the State of Brazil, which was then a part of the Portuguese Empire at the time. As a result, when the Portugal Royal Court moved from Portugal to Brazil in 1808, Rio de Janeiro was chosen as the location for the court of Queen Maria I of Portugal. It was during her reign that Brazil gained the status of a kingdom under the leadership of her son, the prince regent, and future King Joo VI of Portugal, and the country was elevated to the status of a kingdom within the United Kingdom of Portugal, Brazil, and the Algarves. After the War of Brazilian Independence started in 1822, Rio de Janeiro remained the capital of the plural continental Lusitanian kingdom until that year. A colonial country's capital was formerly relocated from its home city to the capital of one of its colonies, marking one of the few times in history it has happened. From 1889 to 1960, Rio de Janeiro served as the capital of an independent monarchy known as the Empire of Brazil, and from 1960 to 1960, it served as the capital of a republican Brazil known as the Republic of Brazil.
Rio de Janeiro has the second highest municipal GDP in the nation and the 30th largest in the world, with an estimated R$343 billion (almost US$201 billion) in 2008, making it the second most prosperous city in the world. It serves as the headquarters for a number of Brazilian oil, mining, and telecommunications businesses, including two of the country's biggest corporations – Petrobras and Vale – as well as Grupo Globo, which is the largest telemedia conglomerate in Latin America. In addition to being the home of many colleges and research institutions, it is the second-largest hub of research and development in Brazil, accounting for 17 percent of the country's total scientific production in 2005, according to government statistics. Even though crime is seen to be high in the city, the city really has a lower incidence of crime than the vast majority of state capitals in the country.