Electronic dance music (EDM) festivals, commonly known as raves, are famous for promoting peace-and-love vibes among thousands of devotees, but in the last few years these huge—and hugely profitable—events have been unable to escape controversy, especially in Los Angeles County.

While Southern California is a cultural incubator that helped turn EDM into a multi-billion dollar industry, a rise in festival-related deaths, most recently of two teenagers in August, has prompted county officials to consider whether these events have a place here at all.

After six months of deliberation, the county Board of Supervisors voted last Tuesday to keep EDM festivals and other large-scale events on public land, but it also unanimously approved all recommendations put forth by a task force of government agencies and industry advocates , including the creation of an ordinance that allows for case-by-case health and safety considerations for events with 10,000 attendees or more .

For EDM community advocates, establishing a dialogue with the county is an encouraging outcome that helps remove the stigma surrounding EDM festivals, which they say are unfairly “singled out” by the county.

“This is a bigger win than most people realize,” said Janine Jordan, founder of the Electronic Music Alliance (EMA) and a member of the Electronic Music Festival Task Force (EMFTF). “It’s supposed to be very difficult to overturn Board of Supervisor decisions. That could have been years of work ahead of us that was just alleviated by them siding with us.”

Concerns about drug abuse at EDM festivals have been mounting for years, but the drug-related death of 18-year-old Tracy Nguyen and the suspected drug-related death of 19-year-old Katie Dix at the Pomona Fairplex rave last August were a breaking point. County supervisors Hilda Solis and Michael Antonovich called for swift action, asserting in a public motion from last September that the deaths were “not isolated.”

In September, the Board of Supervisors formed a second rave task force (the first was in 2010), which drafted health and safety recommendations. Though the county tabled a proposed rave moratorium — which EDM community advocates claim would have constituted a First Amendment violation — responsibility fell to the task force to address the problems plaguing raves.

The 16-person EMFTF was chaired by county health and safety officials and law enforcement, while members of the EDM industry and residents also provided input. Representatives from the two largest EDM festival companies, HARD Events and Insomniac, Inc., were also present, as were representatives of Live Nation, which promotes both events.

The recommendations finalized by the task force will keep the minimum age of entry for EDM festivals at 18, rather than a proposed 21-and-over restriction, and will increase law enforcement and emergency responders, security screenings, and drug education information. Solis, who had suggested a temporary ban on raves in the county, called the decision “a step in the right direction.”

Scrutiny of L.A. County raves intensified six years ago when 15-year-old Sasha Rodriguez took Ecstasy during the 2010 Electric Daisy Carnival and later collapsed, eventually falling into a coma. She was taken to the hospital where she died two days later.

After Rodriguez’s death, the city issued a six-month moratorium on raves held at the Los Angeles Memorial Coliseum and Sports Arena, and within months formed the county’s first EDM task force, which proposed recommendations similar to those approved last week. Though the county and promoters have coordinated to make festivals safer—by reducing attendance and increasing cooling stations, for example—an average event typically results in dozens of hospitalizations. HARD Summer has seen four drug-related deaths since 2013. All told, there have been six confirmed drug-related rave deaths in Los Angeles County since 2006, and three in San Bernardino County, and all of the casualties were 22 or younger.

Ecstasy, a hallucinogen amphetamine also known Molly and formally as MDMA, is the drug most commonly associated with EDM festivals, and its risks are largely misunderstood, with many deaths attributed to causes other than what is thought of as overdosing. That term can be misleading anyway, says Dr. Sean Nordt, a toxicology expert at the University of Southern California’s Keck School of Medicine, as it implies there is a safe dosage of the drug.

Nordt prefers the term “adverse effects,” which in the case of Ecstasy can include convulsion, heart attacks, high fever, kidney failure, and permanent brain damage, even in young, otherwise healthy people. Nordt says deaths more often result from what he calls a “perfect storm” of factors, including large crowds, excessive heat, and dehydration.

“People never think it’s going to be them or their friends,” Nordt said. “[And] people who have used it previously never think they’re going to get into trouble with it. The biggest challenge is to convince people not to use these drugs.”

While some members of Los Angeles’s EDM community dispute that drugs are an inevitable part of festivals, they argue that a zero-tolerance drug policy doesn’t present a viable solution. Mallorie Montesdeoca, who as a teenager attended the 2010 Electric Daisy festival at which Rodriguez died and now, at 24, works in the music industry, says a hard-line approach to drug use isn’t realistic.

“It’s like teaching abstinence,” says Montesdeoca. “If you only teach abstinence, people are going to be getting pregnant left and right. If you don’t teach drug safety, people are going to be dying.”

Drug safety education is part of an approach known as harm reduction, and its practitioners advocate not only informing festival attendees about the substances they may be consuming, but also ensuring EDM festivals are staged in areas where there are proper resources to keep attendees safe.

“If you don’t have them on county land, it’s going to go underground,” Jordan said. “Having fire and medical and law enforcement there is the best chance to keep everyone safe.”

While many EDM festivals have left L.A. County for San Bernardino or Las Vegas, most remaining events have been held at the Pomona Fairplex. However, following the Board of Supervisors’s vote last week, the L.A. County Fair Ground Association, which operates the Fairplex, said it doesn’t intend to host any festivals this year.

The decision is good news for residents who live near the venue, but comes “too little, too late,” according to Reyna Garcia-Ramos. She and some neighbors got together to form an organization called Protect Our Neighborhood after petitioning the county to address festival noise levels, neighborhood traffic, and nuisances such as attendees jumping over private fences to access the venue and urinating on lawns.

The biggest issue for residents, though, is the drugs they say come into their community along with the festivals. Garcia-Ramos cited amnesty boxes, which allow attendees to surrender drugs without legal consequences, as an example of what she considers a double-standard.

“If that same police officer at the festival goes down the street and sees a young Latino male passing out drugs to his friends, do you think he’s going to give him an amnesty box?” asks Garcia-Ramos. “How can we have different standards for rave goers because they’re paying us money?”

With the county’s default EDM festival venue having closed its doors to the events, and no festivals currently on the county’s calendar, the future of EDM in L.A. County remains to be seen. Still, EDM advocates say the recent vote constitutes a victory not only for the festivals, but for the local economy and culture.

“It’s a really urgent sector of the community, and we can’t just send it out to another county,” said Anthony Marinelli of EMA. ”L.A. is a cultural hub, and if we throw EDM away, then what’s the future of L.A.?”