Lisbon is the capital and the largest city of Portugal, with an estimated population of 505,526 within its administrative limits in an area of 100.05 km2. Its urban area extends beyond the city's administrative limits with a population of around 2.8 million people, being the 11th-most populous urban area in the European Union. About 3 million people live in the Lisbon Metropolitan Area (which represents approximately 27% of the country's population). It is mainland Europe's westernmost capital city and the only one along the Atlantic coast. Lisbon lies in the western Iberian Peninsula on the Atlantic Ocean and the River Tagus. The westernmost areas of its metro area form the westernmost point of Continental Europe, which is known as Cabo da Roca, located in the Sintra Mountains.
Rio de Janeiro is the second-most populous municipality in Brazil and the sixth-most populous in the Americas. The metropolis is anchor to the Rio de Janeiro metropolitan area, the second-most populous metropolitan area in Brazil and sixth-most populous in the Americas. Rio de Janeiro is the capital of the state of Rio de Janeiro, Brazil's third-most populous state. Part of the city has been designated as a World Heritage Site, named "Rio de Janeiro: CariocaLandscapes between the Mountain and the Sea", by UNESCO on 1 July 2012 as a Cultural Landscape.
Founded in 1565 by the Portuguese, the city was initially the seat of the Captaincy of Rio de Janeiro, a domain of the Portuguese Empire. Later, in 1763, it became the capital of the State of Brazil, a state of the Portuguese Empire. In 1808, when the Portuguese Royal Court transferred itself from Portugal to Brazil, Rio de Janeiro became the chosen seat of the court of Queen Maria I of Portugal, who subsequently, in 1815, under the leadership of her son, the Prince Regent, and future King João VI of Portugal, raised Brazil to the dignity of a kingdom, within the United Kingdom of Portugal, Brazil, and Algarves. Rio stayed the capital of the pluricontinental Lusitanian monarchy until 1822, when the War of Brazilian Independence began. This is one of the few instances in history that the capital of a colonising country officially shifted to a city in one of its colonies. Rio de Janeiro subsequently served as the capital of the independent monarchy, the Empire of Brazil, until 1889, and then the capital of a republican Brazil until 1960 when the capital was transferred to Brasília.