"Given the financial straits of the Federal University of Rio de Janeiro and all the other public universities the last three years, this was a tragedy that could be seen coming," Ms Silva, a left-wing politician standing in next month's election, tweeted.

The fire started on Sunday evening, after the building - a 19th Century former royal palace - closed for the day. The cause is not known.

No injuries have been reported but most of the 20 million items the museum contained, including the oldest human remains ever found in the Americas, went up in flames.

Brazil's President Michel Temer said in a tweet that it was a "sad day for all Brazilians" as "200 years of work, research and knowledge were lost".

Culture Minister Sergio Sa Leitao said it was a "tragedy that could have been avoided" but a reconstruction effort would begin.

'We had to break down doors'Prof Paulo Buckup, an expert in fish science at the museum, arrived at 19:30 (22:30 GMT) local time to find parts of the building where animal specimens were kept still intact.

"It's unfortunate but the firefighters were not in a position to do anything, to fight anything," he told BBC Brasil's Julia Carneiro.

"They had no water, no ladders, no equipment.

"So we took the initiative to get in to try and save what we could. We had to break down doors. The soldiers helped us carry things."

Prof Buckup rushed into the burning building to save as much of its extensive collection of molluscs as he could, rescuing "a few thousand" specimens, a "tiny" part of the collection.

"I don't know how many tens of thousands of insects and crustaceans were lost," he says.

"I feel very sorry for my colleagues, some of whom have worked here for 30 or 40 years. Now all evidence of their work is lost, their lives have lost meaning, too."

A deputy director at the museum, Luiz Fernando Dias Duarte, expressed "immense anger", and accused Brazilian authorities of a "lack of attention".

"We fought years ago, in different governments, to obtain resources to adequately preserve everything that was destroyed today."

One issue appears to be the lack of a sprinkler system. Mr Dias Duarte told Globo TV that a $5.3m (£4.1m) modernisation plan agreed in June would have included the installation of modern fire prevention equipment, but only after October's elections.

A third of the 30 exhibition halls were closed because of budget cuts, the Folha de Sao Paulo newspaper says.

A major dinosaur exhibition, which was forced to shut following a termite attack five months ago, had recently reopened only thanks to a crowdfunding campaign, the report adds.

Museum librarian Edson Vargas da Silva told local media that the building had wooden floors and contained "a lot of things that burn very fast", such as paper documents.

Why the lack of funds?The museum, Brazil's oldest, is managed by the Federal University of Rio de Janeiro and the federal government has been struggling with huge budget imbalances in recent years.

The deficit was about 8% of GDP in 2017, only slightly down from a record 10% two years earlier.

But Rio de Janeiro state is also facing a budget crisis.

What did the museum contain?Its 20 million artefacts included fossils, dinosaur bones and a 12,000-year-old skeleton of a woman known as "Luzia", the oldest ever discovered in the Americas.

A highlight for many was the Bendegó meteorite, weighing more than five tonnes and discovered in Minas Gerais region in the 18th Century.

The building was also home to items covering the centuries from the arrival of the Portuguese in the 1500s to the declaration of a republic in 1889.

The ethnology collection had unique pieces from the pre-Columbian era and artifacts from indigenous cultures.

Pieces from Greco-Roman times and Egypt were also on display at the museum.

Portugal's royal family transferred the court to the building in 1808, when the country faced the threat of invasion from Napoleon.

The museum was established in 1818, with the aim of promoting scientific research by making its collection available to specialists.