LANCASTER ( — “Rave Party Canceled”: it’s probably the last sign any desert partygoer wants to see.

But Los Angeles County Sheriff’s deputies in Lancaster and Palmdale are crediting social media for helping to shut down two illegal drug “rave” parties in the Antelope Valley, including one before it even started.

READ MORE: Vigils Held For ‘Dedicated, Outstanding, Compassionate’ Nurse Killed In Bus Stop Attack Near Union Station

The first event was disrupted on Aug. 17 after deputies found about 200 people at a party in the extreme northwest area of Lancaster Station’s patrol area in the Antelope Valley, Sheriff’s Sgt. Kevin Pearcy said.

“The area of this party was nearly in Kern County and the 5 freeway was only a few miles away,” Pearcy said. “The music could be heard from nearly five miles away.”

Over 800 people had responded via social media that they would be attending before deputies closed the event down by 11 p.m.

”The problem is the mob mentality that seems to take place after these folks ingest enough alcohol and drugs,” said Lt. Larry Gregg, coordinator for the Antelope Valley Sheriff’s Task Force. “I have seen bonfires, tremendous amounts of nitrous oxide, methamphetamine, molly and bath salts being used by these young adults.”

Four partygoers were cited and released at the scene on various misdemeanor charges. The property owner was warned about large unpermitted parties and advised about potential civil litigation in the event someone was hurt on his property.

READ MORE: Shawn Smith, Suspect In Brianna Kupfer's Murder At Hancock Park Furniture Store, Arrested In Pasadena

Gregg said an investigation is continuing to determine what, if any, criminal charges can be filed.

On Aug. 23, another rave party billed as a “lock down” event inside an industrial warehouse was uncovered online by investigators.

Los Angeles County Sheriff’s Department and City of Lancaster Public Safety officials contacted both the warehouse owner and the promoter of the event and the event was cancelled before it started.

Captain Patrick Nelson of Lancaster Sheriff’s Station said these types of events can be particularly dangerous to partygoers.

“You cannot lock the doors to these events,” Nelson said. “You are asking for disasters of epic proportions such as a fatal fire.”

MORE NEWS: Marvel Actor Gaspard Ulliel Dead At 37 Following Ski Accident

During the past year, Sheriff’s investigators have found over 1,000 illegal rave parties openly advertised on social media, prior to the rave party starting, authorities said.