Brewvies has come out on top in its lawsuit against the state of Utah, likely ending a monthslong legal fight that involved alcohol, sex, the First Amendment — and the superhero movie ”Deadpool.” 

The case began in early 2016, after regulators with the state’s Department of Alcoholic Beverage Control threatened to fine the theater up to $25,000 and to temporarily rescind its license under a law that bans serving alcohol during films with simulated sex or full-frontal nudity. 

On Thursday, U.S. District Judge David Nuffer issued a ruling resolving the case in Brewvies’ favor on First Amendment grounds. Brewvies attorneys had argued that the law hampered its free speech rights. 

“The ruling means the state statute is unconstitutional and the state cannot enforce it,” Brewvies attorney Rocky Anderson said Thursday. ”It means that people don’t have to live in fear and terror of the DABC enforcing this blatantly unconstitutional statute any longer.

“Nonobscene movies now can be shown by anyone, including those who are regulated by the DABC,” the former Salt Lake City mayor said. 

A spokesman for the DABC did not immediately return a message seeking comment. Gov. Gary Herbert and lawyers with the attorney general’s office had previously said the ban is not an infringement of free speech, but rather an attempt to preserve public decency.

“This is not a First Amendment issue,” Herbert said in a KUED news conference last year. “This is the law you have to comply with if you want to distribute alcohol.”

Nuffer saw things differently.

The judge wrote that the state may have compelling interests to avoid ”potential negative secondary effects” from mixing sexual content and alcohol. But the state’s enforcement mechanism, which it used against Brewvies, was ”not the least restrictive means for accomplishing” its goals under the First Amendment. Nuffer also noted that Brewvies was not an obscene, ”sexually-oriented” theater — it shows mainstream movies similar to many other American theaters. 

“The state cannot argue that it has plenary power to control liquor licensing under the 21st Amendment, to the point of obliterating First Amendment rights,” Nuffer wrote in the ruling.

According to court documents, Brewvies was fined more than $1,500 in 2011 for showing the movie “The Hangover Part II,” which also includes nudity, and the theater had been warned when it showed other movies, such as “Magic Mike XXL” and “Ted 2.” The DABC encouraged Brewvies to stop serving alcohol altogether, so it wouldn‘t run into such issues showing racy films. 

According to the documents, an attorney in the Utah attorney general’s office, which represents the DABC, wrote an email to a DABC compliance officer in late February 2016.

The email said: “I hate to bring this up, but it is just too blatant to ignore. Brewvies is showing Deadpool. The reviews describe explicit sex scenes and male and female frontal nudity. I know some people who have seen it, and they confirm that it is very raunchy amid the bloody violence. Perhaps you should refer it to [the state Bureau of Investigation].”

Soon, three undercover police officers with the Bureau of Investigation looked into the showings, and the theater was subsequently threatened with the fine and possible suspension or revocation of its license. 

Anderson said he wasn’t surprised with the judge’s decision. 

“We felt, from Day One, the statute is egregiously unconstitutional,” he said. “Our view has been that the attorney general should have met the highest obligation of that office, and vindicated the people’s constitutional rights.”

Anderson said the ruling would allow Brewvies to permanently show movies such as “Deadpool,” as long as they are not considered obscene or pornographic. 

As for the larger implications for Utah’s alcohol laws, Anderson and the judge noted a parallel with a similar Idaho statute. That law ”was amended to substantially narrow [its] scope,” Nuffer wrote, after a similar legal challenge was filed there.