RIO DE JANEIRO • From the outside, it looks like another historic edifice in Rio's rundown city centre.
Inside, however, is a multi-tiered library so spectacular, so ornate, that stunned visitors feel like they have walked into a movie fantasy set.
"In Harry Potter, we've seen libraries like this!" exclaimed Mr Didier Margouet, a 57-year-old French tourist, looking around at the shelves of leather-bound books climbing the walls under an octagonal skylight of red, white and blue stained glass.
"Yes, like in the movies," agreed his partner Laeticia Rau, 50.
The Royal Portuguese Reading Room - the Real Gabinete Portugues de Leitura in Portuguese - was built in the late 19th century under the stewardship of an association of Portuguese migrants that still cares for the institution.
Its Gothic-Renaissance architecture and plethora of carvings, tiles and sculptures celebrate the glory of the Portuguese discoveries era in the 15th and 16th centuries.
Holding about 350,000 books, some of them very rare, the library today is more a tourist attraction and selfie backdrop than a reading room, though for a few it remains an indispensable haven for the largest collection of Portuguese-language books outside of Portugal.
One such loyal reader is Mr Carlos Francisco Moura, an 86-year-old who writes about the history of Portugal.
He arrived in Brazil from Portugal aged four with his parents and from childhood became a regular visitor. Now retired from his profession as an architect, Mr Moura spends his time leafing through the tomes, copying information for his own books.
"This is the alma mater of the Portuguese in Brazil - the reading room is that and a lot more," he told Agence France-Presse, sitting at one of the dark wooden desks.
The library is a valuable resource, he explained, because since the 1930s it has become a repository of every book published in Portugal.
Brazil's historic connection with its former colonial ruler runs deep.
In 1808, Portugal's king and his government made Rio de Janeiro the capital of the Portuguese empire. Later, the king's son declared independence and made himself the emperor of Brazil.
Portuguese remained the country's principal language and with it a two-way literary culture between the two countries. Today, the Portuguese and Brazilian flags both fly on the library's exterior.
Mr Orlando Inacio, 67, manages the place. He, too, came from Portugal as a boy - and has never returned.
"It's a real point of pride to know that this library created by the Portuguese is one of the most beautiful in the world," he said.
Giving a bit of its history, he traced the library's roots back to an association of Portuguese immigrants started in 1837.
"The aim was to help the immigrants, who in general were little educated, to improve their knowledge, their education," he said.
The association continues to fund the library, its members paying a monthly amount that helps cover part of its overheads. The rest of the income comes from other buildings owned by the association that are rented out.
Mr Inacio acknowledged that the Internet has brought changes, reducing the need for researchers and bookworms to frequent the place except for consulting rare books that are otherwise unavailable.
But his delight in his everyday office is evident. He is, after all, custodian of a temple of literature steeped in history, connecting Portugal and Brazil in a bond of language.