CAMDEN — New Jersey's restaurants and clubs will be allowed to advertise that they let patrons bring their own wine and beer without fear of running afoul of state law.

A federal judge ruled this week in a lawsuit brought by an Atlantic City strip club.

The law states that restaurants that don't have liquor licenses can't advertise inside or outside their establishments that they are B.Y.O.B., even if they allow patrons to bring their own wine and beer.

Violating the statute constitutes a disorderly persons offense.

Stiletto, a club near the Atlantic City boardwalk, contended the law restricted its freedom of speech.

The state argued the law aims to promote the health and safety of New Jersey residents through temperance.

But the judge ruled that didn't override the club's constitutional rights.

"New Jersey's statutory ban on BYOB advertising places a content-based restriction on speech that fails strict scrutiny because it is not supported by a compelling government interest," U.S. District Court Judge Joseph H. Rodriguez wrote, reported.

The court also ruled that banning speech was "more intrusive" than banning conduct.

(Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)

More from New Jersey 101.5: