A judge on Tuesday upheld an order closing movie theaters in New Jersey, finding that the state is not infringing on theaters’ First Amendment rights in its pandemic response.

Judge Brian Martinotti denied a motion for an injunction, which had been sought by the National Association of Theatre Owners, the exhibition industry’s main lobbying group, and six cinema chains. The theaters had argued that the state was discriminating against them by allowing churches to remain open while theaters were ordered to close.

But in his 33-page opinion, Martinotti found that the order is content-neutral, and that the state had shown it was a reasonable response to the COVID-19 pandemic.

“In closing indoor movie theater operations, Defendants are promoting the significant governmental interest of protecting public health by keeping closed areas that present heightened risks for COVID-19 transmission,” Martinotti wrote.

The state had argued that theaters’ pose a unique risk because they are dark, and it would be difficult to enforce a mask mandate. Martinotti held that the state’s arguments were sufficient to show a rational basis for the order.

“By closing only indoor movie theaters, Defendants are leaving open ‘ample alternative methods of communication’ in the form of outdoor movie theaters and at-home streaming options,” the judge wrote.

The theaters filed the suit on July 7, hoping to get a favorable ruling that would put pressure on other states to reopen. At the time, the major chains were aiming to reopen by the end of the month.

But a surge of cases has forced them to push back their plans, and it remains unclear when theaters will be able to reopen in much of the country, including New York and California. Maryland, North Carolina and New Mexico also have no plans to reopen theaters.