Brazil plans on bailing out Rio de Janeiro ahead of the Olympic Games, according to reports.

The Brazilian federal government plans on transferring $849 million in emergency funds to the state of Rio de Janeiro to pay for infrastructure and security during the games, a government official told Reuters on Saturday.

The move comes a day after the governor of Rio declared a state of financial emergency as a crippling recession and a slump in oil prices has left state coffers depleted.

The funds would be used to pay for security personnel and to finish a much-delayed train line to the Olympic venue, sources told Reuters.

Rio’s financial crisis along with the threat of the mosquito-borne Zika virus and political turmoil, including the suspension of Brazilian President Dilma Rousseff, has led to turmoil in Rio ahead of the games.

Interim President Michel Temer is expected to announce the emergency funds Monday. The Olympics start Aug. 5.