This article was produced for ProPublica’s Local Reporting Network in partnership with The Press of Atlantic City. Sign up for Dispatches to get stories like this one as soon as they are published.

A Superior Court judge in New Jersey has struck down a state law granting Atlantic City’s casinos tens of millions of dollars in tax breaks, saying that the measure was passed on dubious grounds and violated the state Constitution.

The ruling, handed down Monday, deals a blow to Gov. Phil Murphy and the state’s legislative leaders, who fast-tracked the legislation through the Legislature last year. It is also a rebuke to the gaming industry, which had argued the bill was needed because it was struggling amid the COVID-19 pandemic.

At issue in the court case were changes to a local taxing program known as PILOT, or payment in lieu of property taxes. Since 2016, instead of paying property taxes, each casino has paid a share of an industrywide assessment that was distributed to Atlantic City, its school district and the county to fund various operations. The number was calculated based on the prior year’s total gaming revenue. But last year, the industry pressed for and won a key legislative change to that formula, excluding online gaming — a fast-growing sector of its business — from the program. The alteration reduced the gaming companies’ total PILOT liability this year by $55 million — revenue cuts that disproportionately impacted Atlantic City, one of the state’s most distressed cities.

A conservative nonprofit group called Liberty and Prosperity 1776 challenged the constitutionality of the law, saying the state’s founding document bars preferential tax treatment. The state countered that the new law was exempt from that prohibition because it served a “permissible public purpose.” On Monday, Atlantic County Assignment Judge Michael Blee sided with the nonprofit, potentially increasing casinos’ tax bills and sending tens of millions of additional dollars into local coffers.

“This Court finds that the Amendment was enacted to aid the casino industry and not for a public purpose,” Blee said in his decision.

At the time the bill was passed, state lawmakers and industry leaders argued that despite soaring online gaming revenues, the change was necessary to prevent financial peril. “We are risking four casinos closing,” said then-state Senate President Steve Sweeney, without providing specifics.

But, as The Press of Atlantic City and ProPublica reported in June, the casino industry was already rebounding from a pandemic slump as it argued for tax relief. Even as the industry claimed fiscal trouble, it had its best year in more than a decade: Casinos in Atlantic City reported roughly $767 million in gross operating profit in 2021. Financial reports show that revenue from in-person gambling has surpassed pre-pandemic levels. Through the first six months of 2022, the most recent data available, the city’s nine casinos reported $339 million in gross operating profits, or 17% more than the same period last year.

“There is no evidence to suggest that casinos could not meet their PILOT obligations under the Original Act,” Blee wrote. The legislation, he concluded, was advanced “to aid what was actually a resurging industry.” That echoed the findings of The Press of Atlantic City and ProPublica investigation, which calculated what each casino’s tax liability would have been had the PILOT law remained unchanged.

Gaming analysts and former regulators then examined that analysis and told us that Atlantic City’s nine casinos could have weathered their increases and remained open.

The Casino Association of New Jersey declined to comment on the ruling, citing its policy of not discussing pending litigation. The organization previously told The Press of Atlantic City and ProPublica that last year’s changes to the PILOT law were necessary. “Failing to adjust the PILOT would have resulted in egregious, inappropriate, and inequitable taxes for any industry, let alone an industry that is still fighting to recover from COVID-19,” the group said in a statement.

Seth Grossman of Liberty and Prosperity said Tuesday he was happy with the judge’s decision to vacate the amendments to the PILOT program and leave the original law in place. “The bottom line is when you have tough economic times, every business is affected,” he said. “So to say you’re going to give one industry a break by making everybody else pay more, that’s not helping the economy. It’s just helping one ‘ailing’ industry.”

He also said he expects some “intense litigation” to be waged over the judge’s ruling.

Indeed, Alyana Alfaro Post, a spokesperson for Murphy, told The Press of Atlantic City and ProPublica on Tuesday that the state “plans to appeal Judge Blee’s decision and is optimistic that it will be overturned.”

The ruling is the second to come down against the PILOT law in recent months. A judge had previously sided with Atlantic County in a separate lawsuit alleging that the state had violated the terms of a 2018 consent agreement that guaranteed the county a certain percentage of the industry’s overall PILOT payment. The county had asserted that the change in the PILOT formula would cost it about $5 million a year.

This month, Blee awarded millions in damages to Atlantic County and required the state to cover attorney fees and other costs. The state is appealing that decision, and on Monday it won a stay from the court on the damages while the case works its way through the appeals process.

Taken together, the decisions in the two cases leave the imminent tax obligations of the casino industry unclear. State regulators, who bill and collect PILOT payments, did not immediately return a request asking for clarification.

Atlantic County Executive Dennis Levinson, who urged Murphy to veto the PILOT bill last year, said that this week’s court decision is another signal that state lawmakers should have left the PILOT program alone.

“Had the governor responded to our concerns about the PILOT amendment prior to and after its passage during a lame duck session, four days before Christmas, this could have all been avoided, saving the taxpayers of New Jersey hundreds of thousands of dollars,” Levinson said in a statement Tuesday.