It was the main stage of the abolitionist and republican movements in the last half of the 19th century.
At that time the number of African slaves was drastically reduced and the city was developed, with modern drains, animal trams, train stations crossing the city, gas and electric lighting, telephone and telegraph wiring, water and river plumbing.
In the first decades, several educational establishments were created, such as the Military Academy, the Royal School of Sciences, Arts and Crafts and the Imperial Academy of Fine Arts, as well as the National Library of Brazil - with the largest collection in Latin America When Brazil was elevated to Kingdom in 1815, it became the capital of the United Kingdom of Portugal, Brazil and the Algarves until the return of the Portuguese Royal Family to Lisbon in 1821, but remained as capital of the Kingdom of Brazil.
From the colonial period until the first independent decades, Rio de Janeiro was a city of slaves.
In order to separate the province from the capital of the Empire, the city was converted, in the year of 1834, in Neutral Municipality, passing the province of Rio de Janeiro to have Niterói as capital.
As a political center of the country, Rio concentrated the political-partisan life of the Empire.
There was a large influx of African slaves to Rio de Janeiro: in 1819, there were 145,000 slaves in the captaincy.
In 1840, the number of slaves reached 220,000 people.
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.
On 27 January 1763, the colonial administration in Portuguese America was moved from Salvador to Rio de Janeiro.
The city remained primarily a colonial capital until 1808, when the Portuguese royal family and most of the associated Lisbon nobles, fleeing from Napoleon's invasion of Portugal, moved to Rio de Janeiro.
Consequently, Villegagnon built Fort Coligny on the island when attempting to establish the France Antarctique colony.
The city of Rio de Janeiro proper was founded by the Portuguese on 1 March 1565 and was named São Sebastião do Rio de Janeiro, in honour of St.
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.