The state of New Jersey issued a lengthy defense on Friday of its order closing movie theaters, arguing that theaters pose an “unnecessary” danger amid a raging pandemic.

The major theater chains — AMC, Regal Cinemas and Cinemark — have sued the state, seeking to force a reopening on First Amendment grounds. A federal judge denied the theaters’ request for a restraining order last week, but has yet to rule on their demand for a preliminary injunction.

In a brief on Friday, the state attorney general’s office argued that Gov. Phil Murphy was well within his rights to order that theaters remain closed. Assistant Attorney General Daniel M. Vannella argued that theaters pose unique risks that make them especially dangerous during the pandemic.

“Indeed, movie theaters require customers to be seated in a confined indoor room for an extended period of time, risking COVID-19 spread from those prolonged interactions,” Vannella wrote. “And those risks are magnified whenever patrons remove their mask, which they do to consume the concessions Plaintiffs wish to sell, and which would also be hard to observe and to prevent in a dark theater.”

Vannella went on to note that such risks are “especially unnecessary” given that people can still stream movies at home. He urged the court not to second-guess the state’s actions to protect public health.

“Bluntly, few preliminary injunction motions present risks this stark,” Vannella wrote.

The theater chains — joined by several smaller theater companies and the National Association of Theatre Owners — filed suit on July 6. At the time, the chains were expecting to reopen by the end of July, and New Jersey was one of only a handful of states that had yet to set a reopening timeline that would allow that to open. The aim was to get a favorable ruling that would pressure the few remaining holdouts to back off, allowing for a nationwide reopening.

Since then, though, nothing has gone according to plan. Amid a rise in infections, California reversed its decision allowing theaters to open in much of the state. Major films — including “Tenet” and “Mulan” — have been postponed. AMC has delayed its reopening to mid- to late-August.

And in Michigan last week, a federal judge upheld the state’s theater closure, rejecting a First Amendment claim brought by a theater in the Detroit suburbs. The New Jersey attorney general’s office cited the Michigan ruling repeatedly in its brief.

In denying the request for a restraining order in New Jersey, U.S. District Judge Brian R. Martinotti also took note that infections are rising in other states, causing them to re-close their theaters.

The theaters argued that there was no good reason to allow churches to remain open while keeping theaters closed, and said that doing so was a violation of free speech. The state cited distinctions between attending church and going to a movie, noting that in a dark theater it is impossible to know if strangers are wearing masks. In a church, Vannella noted that worshippers may remove their masks only briefly to take communion, while a theatergoer may munch popcorn throughout a film.

The state is also allowed to afford greater protection to religious practice, he argued.

“Simply put, as a matter of black-letter First Amendment law, the State does not have to allow a couple a night out to watch ‘Tenet’ simply because it is also protecting their right to freely worship,” he wrote.