As Atlantic City teeters on the edge of bankruptcy, officials in New Jersey have reached a deal to keep the town up and running -- for a while, anyway.
The New Jersey legislature passed a bill Thursday that would give Atlantic City a $75 million loan and 150 days to get its finances in order. If five months from now, Atlantic City can't devise a strategy to balance its budget by 2021, the state could take control of the local government.
A separate bill, also passed Thursday, would allow Atlantic City to collect direct payments from its casinos in lieu of taxes. Those payments would total $120 million a year over the course of 10 years.
The bills now await Governor Chris Christie's signature. Christie has previously refused to sign bills that would provide loans to Atlantic City. Instead, he has proposed a state takeover, which both Mayor Don Guardian and state Assembly Speaker Vincent Prieto have opposed.
The two sides agreed to the compromise deal earlier this week.
On a radio show Wednesday, Christie said that "everything that the Senate president and I asked for is in there," but he refused to say whether he would sign the bill. He is expected to sign it, however, and soon -- Atlantic City desperately needs the help.
The once-gleaming gambling mecca has been on the verge of financial catastrophe for some time. The city government recently managed to make a $1.8 billion bond payment that was due on May 2, when many expected it to default.
But even after making that payment, Atlantic City still faced a $33.5 million budget gap. Last month the state sued Atlantic City to ensure teachers would get paid before other city workers, because they didn't have enough money to pay everybody.
Two civil rights groups -- the NAACP New Jersey State Conference and the ACLU of New Jersey -- also staunchly opposed Christie's plan to have the local government taken over by the state
"A cornerstone of our democracy is the right of the people to elect their local government and to ensure, through the ballot box and public participation, that it is accountable to the people," the groups said in a statement.
Moody's recently downgraded the city to a rating that Gov. Chris Christie compared to that of debt-ridden Puerto Rico.
Atlantic City's current financial woes started in 2014, when four of the city's casinos closed down. They accounted for about 70% of the city's tax revenue.
Of the four remaining casinos, three have filed for Chapter 11 bankruptcy protection, including Caesar's, Bally's and Trump Taj Mahal
--CNNMoney's Aaron Smith contributed to this report.