Brazil’s federal government has agreed to provide emergency funding to Rio de Janeiro state after the host of this year’s summer Olympics declared an emergency as it runs short of cash weeks before the start of the games, O Globo reported.

Acting President Michel Temer’s administration will ask Congress to authorize a one-time payment of 2.9 billion reais ($850 million) to help the state complete work on its subway system and pay civil servants, including overtime for police officers, said Saturday, citing unidentified government officials. Temer’s press office didn’t respond to an e-mail and phone call on Saturday seeking comment.

Rio announced the financial emergency this week, saying it didn’t have enough money to meet its commitments before the Olympics start on Aug. 5. The country’s worst recession in decades and weak tax revenue because of the fall in oil prices have drained Rio’s coffers and made it difficult to pay for everything from health care to police.

“The financial crisis has been causing severe problems in providing essential services and may cause a total collapse of public security,” the state government said Friday.

While Brazil is largely on track to host the Olympics, it has received some negative press. The recent setbacks include pollution along Rio’s iconic shoreline, where Olympic sailing events will be held, travel risks related to the Zika virus, and the collapse of a seaside bicycle path that left two dead in April. The country received similar criticism about its preparedness to host the 2014 World Cup soccer tournament, which in the end was widely viewed as a success.

©2016 Bloomberg L.P.

This article was written by Randall Woods from Bloomberg and was legally licensed through the NewsCred publisher network.

Photo Credit: Brazil's interim President Michel Temer, left, talks to Rio de Janeiro Mayor Eduardo Paes as they visit the Olympic Aquatics Stadium at the Olympic Park in Rio de Janeiro, Brazil. Felipe Dana / Associated Press