CREDIT: AP Photo/Jae C. Hong

For two years, the private organization running the Olympic Games in Rio has sworn that it isn’t running a deficit and won’t need to be bailed out with government funds. But then a day before the games began, officials indicated that it will in fact need help paying for the costs, and on Wednesday a court ruling paved the way for a bailout.

As recently as July 21, lawyers for the Rio 2016 committee told courts that it had no cash shortfalls. It therefore called claims that the government would subsidize the Olympics “childish,” saying, “The federal government, Your Honor, therefore has no obligation to contribute financially or in any other way to the realization of [the committee’s] activities.”

But on August 4th, a day before the opening ceremony, a government official said that the federal government was ready to give the committee 120 million reals (about $37.4 million) and municipal governments had readied 150 million reals (about $46.75 million). Rio 2016 officials started to acknowledge deficits that could impact the Paralympics, set to start in September, and the committee is now in talks with the government for additional funding.

“For two years the organizing committee said they didn’t have public funds, and now on the eve of the event, literally one day before it started, there’s this news that public money will be necessary,” Sérgio Luiz Pinel Dias, one of the prosecutors who has been seeking to audit the finances of the Rio 2016 committee for two years, told the Wall Street Journal.

It’s almost certain that the Rio games will run a deficit and go far over the original budget of $2.8 billion it included in its bid. Not a single Olympic Games since 1960 has come in under budget, with an average cost overrun of 156 percent, and researchers have already found that Rio is already $4.6 billion, or 51 percent, over budget. Costs could come to $10 billion.

At first, an injunction kept the games from being bailed out with public funds unless the committee opened its books up for public scrutiny. But on Wednesday a judge ruled that the organizing committee could in fact receive government money to cover shortfalls without the extra transparency.

The prosecutors who had been seeking disclosure of the committee’s finances warned that without it, there was no way to know of any potential graft or unnecessary costs being covered with taxpayer money. “We can’t give a blank check to the organizing committee. That’s not how things work,” Dias said.

A spokesman for the committee said it would disclose how it spends government money, but prosecutors argued that would give only a limited picture without a full understanding of what the original private money was spent on and why costs went over.

Rio, and Brazil generally, are in no shape to dole out government largesse. While Brazil’s economy was booming when it was selected to host the 2016 Summer Games in 2009, it has since sunk into the worst recession the country has seen since the 1930s. Rio’s economy is faring no better. Weeks ahead of the start of the games, the governor of the state of Rio de Janeiro declared a state of financial emergency and requested federal funds to stabilize it. Its request was met with a 2.9 billion real ($850 million) bailout.

The country’s economic crisis has already resulted in deep cuts to social programs, teacher and police salaries, and security budgets. Meanwhile, it has other problems it needs to tackle, including the public health emergencies of widespread Zika cases and Dengue fever.