RIO DE JANEIRO -- Long before Brazil's National Museum went up in flames, the people who ran it were pleading for help to renovate the dilapidated 200-year-old building that held much of the nation's historical and scientific heritage.

They appealed for $4.2 million in private donations three years ago -- but received just $240,000, according to the Federal University of Rio de Janeiro, which oversees the museum. They'd turned to businesses for aid because government funds were declining as officials slashed budgets to cope with a recession.

The lack of investment may have doomed the museum, which was gutted on Sept. 2 and lost most of its 20 million artifacts, many of them literally priceless, including what it likely the oldest human fossil in the Americas. It was among the greatest blows to a museum anywhere in recent times.

While the cause is still under investigation, the loss is causing belated soul-searching about why Latin America's largest economy had devoted so few resources to protecting and maintaining the museum, housed in a structure built for Brazil's now-defunct royal family.

"Brazil can't set its priorities. I still can't believe this tragedy happened," university dean Roberto Lehrer told The Associated Press in a recent interview. "It isn't only the state that failed the museum, it is also our society. There's money for Disney shows in Rio, but not for the museum."

Hours after the fire, Brazilian President Michel Temer allocated $2.5 million in emergency funds for the museum, leading many to lament that it took a tragedy for authorities to make a priority of a national treasure. While there is not yet a full accounting of what was lost, museum administrators have estimated 90 per cent of its holdings were torched, including Egyptian antiquities, Brazilian indigenous art and documents going back hundreds of years.

The budget-squeezed museum had spent only $4,000 on safety equipment such as fire alarms and extinguishers from 2015 to 2017, according to Contas Abertas -- "Open Accounts" in English -- a non-profit that tracks spending. Meanwhile, it said, Brazil's Congress signed a $120,000 contract last year to wash the cars of 19 lawmakers.

The museum languished even as the country lavished billions of dollars on sports stadiums and public works to host the 2014 World Cup and 2016 Summer Olympics. Roughly $1 billion was spent on the Mane Garrincha Stadium in the capital of Brasilia, and it's barely used today, despite costing $170,000 a month in maintenance.

The news website UOL recently compared spending on the museum to Rio de Janeiro's most famed soccer venue: "Upgrades to Maracana Stadium would have paid for 2,400 years of maintenance for the National Museum."

Discussions about spending priorities come at a time when Brazilians have been battered by near-daily revelations of vast sums raked off of public contracts by political corruption, in total several billion dollars over more than a decade. Launched in 2014, the "Car Wash" investigation into inflated construction contracts and kickbacks to politicians has brought down dozens of the country's biggest names, including jailed former President Luiz Inacio Lula da Silva.

Ney Santos, chairman of Observatorio Social do Brasil, another non-profit that tracks public spending, said Brazil clearly has the resources to finance small operations like the National Museum.

"The money exists, but those resources are wasted all year round," said Santos. "Brazil's society is less vocal than in other countries, and only wakes up momentarily when some clearly avoidable tragedy occurs."

The museum had a yearly budget of $1.75 million, most of which came from Federal University of Rio de Janeiro. It got about $125,000 in the past from other agencies, such as the Culture Ministry, but those funds had fallen to $90,000 this year, according to museum officials.

Some funds came from the cost of admission to the museum, about $1.25 per visitor.

In the wake of the fire, some government ministers blamed the university for not spending enough to maintain the museum. The university, which has about 70,000 students, says its overall budget has been squeezed as well, falling from $112 million to $102 million in 2017. So far this year, it has only received $94 million for all its activities.

Officials said that has translated into cuts to many things, including museum maintenance.

Frustration over the loss has seeped into the country's presidential campaign.

Before the fire, only two of the main presidential candidates had mentioned investment in culture in their platforms: environmentalist Marina Silva and left-leaning Fernando Haddad. Since the blaze, other candidates have been promising more consistent funding and more attention to such institutions, though they have been light on details.

Silva called the fire "a lobotomy in the Brazilian people" and pledged to increase funds for museums if elected. Haddad said "it is regrettable to see such neglect" in several Brazilian museums and cultural institutions, and promised change if elected.

One exception is poll leader Jair Bolsonaro, a far-right congressman who sometimes associates culture and art with left-leaning politics.

"It caught fire already. What do you want me to do?" Bolsonaro told reporters a few days after the blaze.