Rio state authorities declared a “state of public calamity” on Friday over a major budget crisis in order to release emergency funds to finance the Olympic Games due to begin in August.

The decree authorises the state to “adopt all necessary emergency measures to ration essential public services in order for the Rio 2016 Olympic Games and Paralympic Games to take place”.

“Any institutional instability would hurt the country’s image,” said the decree, signed by acting governor Francisco Dornelles.

The August 5-21 Olympics and September 7-18 Paralympics in Rio de Janeiro will be the first to be held in South America.

The events pose “serious difficulties in delivering essential public services and could even cause a collapse in public safety, health, education, transportation and environmental management,” the decree said.

Rio de Janeiro state is in financial straits due to the fall in global oil prices, while Brazil overall is floundering through a deep recession.

Police, teachers and other government workers in Rio state have seen pay cheques delayed because of the cash crunch. Retirees have protested because of unpaid pensions.

Brazil’s economy shrank 3.8 per cent last year, its worst recession in 25 years. The International Monetary Fund and the market are predicting a similar contraction this year.

Amnesty International expressed concern at the cuts to social services, which could affect the training of security agents to work in the crime-ridden slums known as favelas.

The decision to cut services and security ahead of the Olympic Games “is not only a shock but is also incredibly worrying, especially given the bad history of police killings and murders,” Amnesty’s Brazil director, Atila Roque, said in a statement.

Rio’s state budget shows a US$5.6 billion shortfall for 2016. Royalties from oil – the state’s main revenue-earner – are projected to collapse from US$3.5 billion in 2014 to just US$1 billion this year.

Dornelles has called the situation in his state “tragic”.

He urged the national government to step up, and pressed authorities to look at what public assets could be sold off to raise cash.

After much pleading, Rio received nearly US$300 million from the federal coffers to extend its metro network to link the main Olympic zone of Barra da Tijuca with the chic Ipanema district.

But the federal budget is in no better shape.

Brazil’s primary fiscal deficit is forecast to be around US$47 billion. And the government is confronted with double-digit inflation, unemployment at a record 11 per cent.

The climate has been worsened by political upheaval. The country is in the midst of a controversial impeachment process against its leftwing president, Dilma Rousseff, who has been suspended from office for alleged manipulation of public accounts.

She has been replaced in the interim by her vice president, Michel Temer, who comes from the centre-right PMDB party – the same grouping that runs Rio de Janeiro and the state housing it.

Rousseff’s fate is to be decided by the Senate in the coming months, likely in the middle of August, when the Olympics will be in full swing.

The Games are expected to bring in 10,500 athletes and half a million tourists from around the world, with sporting events and Rio itself to be thrown into the glare of international media.