Anger is smouldering in Brazil after a fire destroyed the National Museum of Brazil, a cherished historical repository that lacked a sprinkler system and had suffered years of financial neglect.

Key points: Protesters angry over lack of government funding to protect Brazil's culture

Protesters angry over lack of government funding to protect Brazil's culture Museum held largest collection of Latin American artefacts

Museum held largest collection of Latin American artefacts Fire damage feared to be catastrophic

Outside the entrance to the 200-year-old former Imperial Palace, police in riot gear shot tear gas into an angry crowd that tried to enter the site, television images showed.

Later, police granted access to the site's perimeter, which protesters surrounded in a symbolic "embrace".

The rumbling tensions reflect anger over the destruction on Sunday (local time) of the much-loved yet dilapidated museum, which suffered from declining federal funding.

People protest in front of the National Museum holding signs saying "Erased our history" and "Education is investment". ( Reuters: Pilar Olivares )

It stirred emotions in Brazil, whose angry electorate is reeling from a frail economy, widespread graft and rising violence ahead of an unpredictable presidential election in October.

"It's a crime that the museum was allowed to get to this shape," said Laura Albuquerque, a 29-year-old dance teacher who was in a crowd protesting outside the gates.

"What happened isn't just regrettable, it's devastating, and politicians are responsible for it."

The museum held Latin America's largest collection of historical artefacts, and the damage was feared to be catastrophic.

The protesters gathered outside the museum gates tried several times to push into the site, demanding to see the damage and calling on the Government to rebuild. Police held the crowd back with pepper spray, tear gas and batons.

The museum held South America's largest collection of artefacts. ( Reuters: Ricardo Moraes )

"This fire is what Brazilian politicians are doing to the people," said Rosana Hollanda, a 35-year-old high school history teacher, who was crying.

"They're burning our history, and they're burning our dreams."

Brazil's culture minister Sergio Leitao told the Estado de S.Paulo newspaper the blaze was likely caused by either an electrical short-circuit or a homemade paper hot-air balloon that may have landed on the roof. Launching such balloons is a long-held tradition in Brazil and they routinely cause fires.

Sorry, this video has expired Brazil's National Museum in flames

The museum's pastel-yellow facade remained standing after the blaze, but a peek inside its giant windows revealed a roofless interior of blackened hallways and charred beams. Every so often, firemen emerged with a pot or a painting they had managed to rescue.

Rio fire department Commander Roberto Robadey said the hydrants outside the building were dry when firefighters arrived, forcing them to turn to a nearby lake and tanker trucks for water.

"Yesterday was one of the saddest days of my career," he said.

Governments would not provide funds

Luiz Fernando Dias Duarte, the museum's deputy director, criticised authorities for starving the museum of vital funding while spending lavishly on stadiums to host the World Cup in 2014.

"The money spent on each one of those stadiums — a quarter of that would have been enough to make this museum safe and resplendent," he said in an interview in front of the smouldering ruins aired on Brazilian television.

The museum is not the first to burn down in Brazil, where public money for cultural projects has been drying up after a deep recession. In 2015, a blaze destroyed the prestigious Museum of the Portuguese Language in Sao Paulo.

In 2016, President Michel Temer was forced to reinstate the Culture Ministry after an outcry from some of the country's top artists over his policy to fold it into the Education Ministry to save money.

On Monday, his office said he had met with representatives from major Brazilian companies and banks to look into ways to help rebuild the museum "as soon as possible".

A large crowd gathered outside the National Museum of Brazil in Rio de Janeiro. ( Reuters: Pilar Olivares )

The museum's decline did not happen overnight, said Renato Rodriguez Cabral, a teacher in the geology and palaeontology department.

"This was a tragedy foretold," he said, hugging distraught students and co-workers who poured into the site on Monday.

"Successive governments would not provide funds, they would not invest in infrastructure."

Between 2013 and 2017, the National Museum in Rio's federal funding fell about a third, to 643,567 reais ($214,000), according to official budget data.

The funding cuts were particularly acute this year, with the museum receiving just 98,115 reais ($32,750) between January and August.

The museum, which is tied to the Rio de Janeiro federal university and the education ministry, was founded in 1818 and housed several landmark collections, including Egyptian artifacts and the oldest human fossil found in Brazil.

Reuters/AP