The owners of an Idaho movie theater is challenging an obscure state law that bans the sale of alcohol during movies and films that depict sex after a police bust during a showing of “50 Shades of Grey.”

The owners of Median Cinemas and Village cinema sued Idaho State Police after its alcohol enforcement division threatened to revoke their liquor license for serving alcoholic beverages to undercover officers last year, reported KOIN-TV.

Village Cinema offers a “VIP” section in some theaters that allow adults over 21 to buy and drink alcohol during movies — but state troopers investigated an anonymous complaint that showings of the hit movie violated a little-used statute.

State police said they warned the theater that showings of the rated-R movie violated the state law, which was passed 16 years ago, and threatened to revoke its liquor license.

Two undercover detectives then went to the theater about 40 minutes before the movie began, purchased a Blue Moon beer and a rum-and-Diet Coke and drank the alcoholic beverages after the sexually explicit movie began.

The state police complaint notes that waitresses did not tell the undercover detectives they couldn’t drink alcohol during “50 Shades of Grey,” and employees allowed them to do so throughout the movie.

The theater’s owners, however, said the detectives ignored signs and warnings from employees about drinking during the movie.

Dave Corkill, one the theater’s owner, said he had shown hundreds of movies that potentially violate the statute but no complaints had ever been filed.

His co-owner said they believe the law is “out of date and silly,” but she said they follow it anyway.

The theater’s lawsuit argues that a similar case in California ended up in federal court, which found that those restrictions violated the First Amendment.

The California law was eventually repealed.

The lawsuit claims the theater owners had lost money because they could not show other popular movies, including “The Wolf of Wall Street,” due to the restrictions.