A judge has ordered organizers of a pop-party being promoted for this weekend in Long Branch to cancel the event, and bans them from promoting future illegal parties on social media.

The order, signed by Superior Court Judge Lisa Thornton, is a victory for the city.

Mayor John Pallone said in a new release, "This is a legal victory for the city, but the work is not done. We are ready to add any individuals who promote any future events without permits to our lawsuit and hold them accountable."

At least three of the events organizers appeared in court, and agreed to post cancellation notices. The judge warned them that if they failed to comply, or posted anything contradicting the judge's order, they could be held financially liable for the clean-up and police overtime costs for the last pop-up held on May 21. They agreed to comply.

The Long Branch Beach Linkup on June 19th is CANCELED. There will be no future "Beach Linkups," "Pop Up Parties," or similar events without permits in the City of Long Branch. It is ILLEGAL to consume alcohol, tobacco, or marijuana on the Long Branch beach, boardwalk, or surrounding public area. - Notice that must be posted on social media by order of Judge Lisa Thornton

Despite the cancellation of the event, Long Branch Police are still preparing for crowds in case some people didn't get the message.

On Twitter, police cautioned residents they will see an increased police presence throughout the city this weekend. They also warned all parking regulations will be strictly enforced and any illegally parked vehicles would be towed.

Other towns are also seeking relief from the courts to stop pop-up parties that have brought violence and vandalism to beach communities.

Long Branch City attorney Lou Rainone says he hopes this legal win will help other shore towns prevent illegal gatherings that threaten tourism.

"For two years, municipalities across the state have struggled to respond to this difficult and growing problem. Long Branch has shown the way forward, and now other towns are following our lead," Rainone said.

Eric Scott is the senior political director and anchor for New Jersey 101.5. You can reach him at eric.scott@townsquaremedia.com

Click here to contact an editor about feedback or a correction for this story.

Cape May, NJ: 15 wonderful places to visit

15 sensational places to visit in Seaside Heights and Seaside Park

From amusement rides to all the boardwalk food and lots of water fun, Seaside Heights and neighboring Seaside Park have endured as a family friendly spot for all ages.

Along the way, the Seaside Heights Boardwalk and Casino Pier have been struck with tragic disasters - such as fire, Superstorm Sandy and another fire. Both have proven their resiliency through rebuilding and expansion.

UP NEXT: See how much gasoline cost the year you started driving