Rio de Janeiro on Friday declared a state of financial emergency and requested federal funding to help fulfill obligations for public services during the Summer Olympics, which start Aug. 5.

As Brazil faces its worst recession since the 1930s, the revenue of the state reliant on the petroleum industry fell with the slump in global oil prices in the last two years. Emergency measures were required to avoid “a total collapse in public security, health, education, transport and environmental management,” a decree in the state's Official Gazette reportedly said.

Rio is hosting the first Olympics to be held in South America. The Olympics are to be held Aug. 5-21 and the Paralympics Sept. 7-18. Rio is expecting about 500,000 foreign visitors during the 2016 Games.

rio olympics 2016 A banner with the Olympic logo for the Rio 2016 Olympic Games seen at the Olympic Tennis Centre of the Olympic Park in Rio de Janeiro, Dec. 11, 2016. Photo: GETTY IMAGES/YASUYOSHI CHIBA/AFP

“The state’s financial emergency in no way delays the delivery of Olympic projects and the promises assumed by the city of Rio,” Mayor Eduardo Paes said Friday on Twitter.

The local organizing committee for the games also said the state’s fiscal situation did not impact its actual running of the Olympics as that relies entirely on private funds.

The announcement followed Brazil's Interim President Michel Temer's visit to Rio this week. Temer said federal government would ensure all obligations are met for the success of the games.

While the majority of Olympic infrastructure costs have been spread across city, state and federal budgets, with some financing from private companies, the state is responsible for most day-to-day security and health services in Rio, Reuters reported.

The country is also undergoing a political crisis after the suspension of President Dilma Rousseff. Three ministers from Temer’s government have stepped down in the past month following allegations of corruption at the state-run oil company Petrobras. Some of Brazil's richest businessmen and powerful politicians have come under fire due to the graft scandal.

Brazil is also facing an outbreak of the Zika virus, which has been linked to the birth defect microcephaly, in which babies are born with abnormally small heads frequently associated with developmental issues. So far, more than 1,400 cases of microcephaly in babies have been linked to Zika in Brazil.

However, the World Health Organization has rejected pleas to move or postpone the games in Rio.