SALT LAKE CITY -- A federal judge has sided with a movie theater facing revocation of its liquor license for showing "Deadpool."

In a ruling handed down Thursday night, U.S. District Court Judge David Nuffer sided with Brewvies and made a restraining order against the state permanent. It blocks Utah from taking any kind of action against the theater for showing the R-rated action comedy.

"The State has violated the First Amendment by bringing an administrative enforcement action against a mainstream motion picture theater showing an R-rated movie," Judge Nuffer wrote.

Brewvies faced revocation of its liquor license by Utah's Department of Alcoholic Beverage Control for showing "Deadpool." The state contends the theater violated Utah liquor laws that forbid licensees from showing full nudity or sexually explicit conduct. Brewvies sued the DABC, challenging the law as unconstitutional.

In his ruling, Judge Nuffer said the provision of liquor laws that landed Brewvies in trouble is "overbroad." Unlike strip clubs that face similar regulation, Brewvies is not an adult-oriented business.

"Brewvies is no Playtime Theater. It is not the Pussy Cat. Nor Kandyland, or Teasers, or the Cajun Club, or Angels Sports Bar," the judge wrote. "Brewvies does not focus on sex. It shows the same movies that other, non-sexually oriented movie theaters show but with alcohol. It is not a statutorily defined sexually oriented business."

Brewvies lawyer Rocky Anderson told FOX 13 on Thursday night his clients were thrilled with the judge's decision.

"This statute is so egregiously unconstitutional there’s no way it should be defended by the state," he said.

The state argued it had an interest in enforcing the statute, calling the mixing of alcohol and sexual content "an explosive combination."

A spokesman for Utah Attorney General Sean Reyes told FOX 13 they were reviewing the decision and had not decided if they would go to the 10th U.S. Circuit Court of Appeals in Denver.

Brewvies previously faced a fine for violating the same statute by showing "The Hangover, Part II." The theater accused the DABC of threatening its license over "Magic Mike XXL" and "Ted 2."

Anderson praised his clients who faced ruin of their business.

"I consider them heroes for not caving in to the DABC like the Eccles Theater," he said.

Recently, the Eccles Theater in downtown Salt Lake City would not allow beer to be consumed inside the theater space while the musical "The Book of Mormon" was being performed because of a scene featuring genitalia.

Read the judge's ruling here: