The portraits are, as these things usually are, much more impressive than reality likely was. Rio de Janeiro, for all its natural beauty, was a shabby, unimportant capital of a backwards colony. The Portuguese crown, on the other hand, was filled with odd characters, seasick and very likely filthy.

Portuguese Rio
The Brazilian National Library, Cinelândia Square, downtown Rio de Janeiro. (Photo by Marcio Isensee/Shutterstock)

The colony and coloniser glared at each other with some distaste. It was Rio de Janeiro’s first experience in being a living contradiction, an art that it still practices today. It’s the only colony in modern history to have swallowed its own empire.

John VI, the acting ruler of Portugal, travelled to the tropics a prince, his mad mother still holding the title of queen; in Rio, he would become a king, just as Brazil would become a kingdom. The country has very few heroes in its culture; figureheads are divided into buffoons and rogues. John VI is usually seen as the first, a shy, fearful glutton pushed into a terrifying journey by the English, and who never really understood the art of politics.

John was a second son, not expected to rule until his older brother died of smallpox, a fact that probably contributed to his image as an unprepared loser. The portrait doesn’t really match reality. Napoleon would, with frustration, describe John as the only one who fooled him; in any case, it is hard to reconcile the image of the cartoonishly frightened soft prince with a man that would transform Rio into a city capable of ruling itself and its coloniser.

The first priority was housing. The court demanded a lot of homes that simply had not been built; while John, Maria and Carlota had found suitable residences, they had brought along a demanding court with too many people for the modest colony.

The solution was to seize homes from current residents; it was common to find homes marked with the letters PR (Prince Regent) to mark the takeover. Brazilians, with their usual sense of humour, took to saying the letters stood for “ponha-se na rua” (get out). They would also come to grow frustrated with the intrusion of the court. Better food and products were given to the newcomers. Taxes were raised.

Hard feelings aside, change was inevitable. The city grew, moulded into something suitable for a prince to stay in. Street lighting, water fonts, and better streets would come; John would also open ports to new products and allow industry in the country (an interesting little detail: the taxation for imported goods from Portugal to Brazil was 16%; the taxation for English products was just below, 15%). No more the plain fashions of a dull countryside for Rio de Janeiro; that, of course, would not do for a European court.

Portuguese Rio de Janeiro

John’s hunger for civilising the city did not stop at a few ticks: he brought many institutions that are still around Rio de Janeiro now. The Botanical Garden, with its magnificent palm trees that still grow, for which he had a special fondness. The National Library, with documents that had been transferred from Portugal. The bathhouse, the first Brazilian bank. To ensure that taste would rule, a French Artistic Mission brought artists to build the Royal School of Sciences, Arts and Crafts.

In everything, the Empire had a taste for the over-the-top. It also had a taste for spending money on red tape; John found jobs and functions for almost every single one of his court members, not necessarily for the sake of talent. This habit of building big and employing many is probably one of its most enduring legacies; many Rio mayors leave office with big buildings from which public money bleeds.

A lot of this was paid for by one of the Empire’s greatest industries: African slavery. The free population of Rio grew, but the city had the biggest slave population in the Americas, too. In its streets, the black and brown population did the hard work white Portuguese and Brazilians would consider below them.

To deal with the prospect of an uprising, John created the Rio military police, an organ still alive today. There has never been a better manifestation of the upper-class paranoia, inherited from the royals, that one day black Brazilians might demand equality. Even today, black Brazilians die in larger numbers after conflicts with the police, and the streets of Rio are one of their main graveyards. It would be 1888 before Brazil abolished slavery.

Long before that, John VI was gone, back home to deal with an uneasy Portugal. The Empire stayed. His son Peter would declare Brazil’s independence not long afterwards. “If Brazil is to break away, it’s better that you do it, Peter, than some other adventurer,” John had told his son. Indeed, his family would hold power in newly independent Brazil for more than 50 years – first through Peter I, and then, after a brief interval, through Peter II, who Brazilians remember as a gentle-looking old man with a beard like Father Christmas.

Under Peter II’s command, Rio blossomed again, an industrialised wonder, led by an emperor so keen on innovation and so in love with knowledge that he was one of the first men to own a telephone. A certain wide-eyed nostalgia covers the period, lost in images of industrial wonder man Viscont of Mauá bringing railways and banks. But in truth, Peter II was supported by slave-owning coffee farmers, the army and the church, all of which would abandon him eventually. Brazilian politics, as ever, are ruthless; the military coup that brought in the republic would follow.

The Brazilian royal family still exists today: strange, decaying curiosities who at times snipe about the state of Brazilian democracy, but don’t do so about the many periods of dictatorships. In its streets, its architecture, its natural beauty and its people, Rio de Janeiro remains, as ever, a strange empire.

[Read more: Ignore the nay-sayers: the Olympics has changed Rio for the better]