Around 2 a.m. on June 3, 2012, guests started spilling into the parking lot of Loft 59 Nightclub in Naples, Fla. Many were vomiting, some had chemical burns to their skin and scratched corneas, others had head injuries and broken bones that would eventually render a few wheelchair-bound. Soon epidemiological officials from the Collier County Health Department would descend on the gruesome scene.

The culprit? Foam.

“It smelled like soap and it was mostly dripping from the ceilings,” one victim told Naples News. “I put my trust in the club owners. I thought they knew what they were doing.”

Get the latest in beer, wine, and cocktail culture sent straight to your inbox.

The nightclub industry, in fact, seems built on club owners not really knowing what they are doing — beds in bars, for example —but surely hoping they accidentally stumble upon the next gimmick that will get partiers into their bars. Now, the idea of injecting foam into a club may seem pretty strange, as it did when it was introduced in the early 1980s, but it would create an immediate local sensation, then form a cottage industry of nightlife that, remarkably, still prevails across the globe today.

It started with much more humble origins.

Espuma, literally meaning “foam” in Spanish, started in Ibiza at a club called Amnesia, the birthplace of acid house music and the oldest nightclub on the island (having opened in 1976). The then-open-air terrace club started foam parties with basic fire hoses.

“The fire department would literally go into the street, put a hose into the hydrant, and run it through the club and upstairs until you filled the whole dance floor below,” recalls Robin Whincup, who first encountered a foam party while on vacation in Ibiza in the mid-1980s.

Jane Bussman, the author of “Once in a Lifetime: The Crazy Days of Acid House,” and a visitor to Amnesia in its early espuma days, claims the mostly British tourists back then would “flail around [in the foam] like very drunk puppies in their first snowfall.”

It was a far less cute sight by morning. “The problem was it left a lot of water residue on the floor afterward,” explains Whincup. “I had to come up with a better idea.”

Whincup was a bounce house operator and new father at the time. He took what was essentially a vacuum cleaner motor, screwed on a mesh sock, then connected a half-inch-diameter plastic hose. Reversing the vacuum’s suck function to blow, the fluid would squirt into the sock right in front of the air stream, then shoot out, leaving a mere 1 percent of the water buildup on the floor.

He called it the Foam Cannon.

“Before me, no one had ever had a foam party in the U.K., and it caught on very quickly,” he claims. He started a new company called Big Fun, this time for an adult audience.

Whincup used his background in bounce houses to add inflatable perimeters to dance floors, assuring no foam would escape to the main areas of the club. He created an oil-drum-sized device that could “pre-foam” an entire dance floor in the 30 minutes before partiers arrived. A typical party would have four Foam Cannons shooting at once, soapy streamers arching 20 feet along the nightclub ceiling.

“It was such a blizzard of foam with all the lights shining through it,” he explains. “It looked really cool.”

Whincup would tackle the north of England, renting and selling his equipment to some of the era’s biggest nightclubs like Mayfair Ballroom in Newcastle, which hosted a weekly Roman toga night in concert with the foam. He partnered with a buddy, Roy Barlow, who would handle the top spots in southern England like The London Hippodrome. For a good chunk of the 1990s, the U.K. became the epicenter of foam parties.

Whincup reckons he must have sold over 500 $3,500 Foam Cannons and made well over $1 million during those seven or eight years. Unfortunately, he never got any sort of patent or trademark on the Foam Cannons — he claims people simply didn’t protect their IP as much back then like he would have today. He is proud of how much cleaner and safer his foam parties were than the ones that soon followed.

“We went through a lot of effort to get a detergent that wasn’t going to hurt people’s eyes,” he explains. “But it was just never 100 percent safe, and it still isn’t today. You’re crawling home at stupid o’clock, you’re not going to shower before hopping into bed, and if you have sensitive skin, you’re almost certainly going to get a rash.”

A rash would be the least of the worries of foam-party patrons as foam parties became more prevalent across the pond.

Whincup started selling Foam Cannons to America in 1993, partnering with another bounce house purveyor based in Orlando. By then, however, he was ready to get out of the foam party game, as he was starting to become concerned about liability issues. Someone else would have to take on the challenge in the States.

“‘Oh no no, this was done in Ibiza years ago, it won’t work!’” Yves Di Lena recalls being told when he tried to bring the foam party concept to Miami. The then-40-something Frenchman had also partaken in Ibiza’s foam scene in the mid-80s and then introduced them at a Paris restaurant he owned. He immediately realized they could be a sensation in America as well, but he, too, feared our sue-happy culture.

“There is also in America this situation with everyone suing everyone else. So that was a problem,” he explained to the Miami New Times in 1995. He was using the same kind of foam technology normally used to put out airstrip fires. “I didn’t want a million people suing me because they slip in the foam or get wet clothes,” he said.

Ultimately he decided to have patrons sign a disclaimer before entering the South Beach nightclubs Warsaw Ballroom, which pumped 3,000 liters of foam into the club every Saturday night, and (yet another club named) Amnesia, where he promoted foam parties on Tuesday and Thursday nights. Amnesia’s would often attract a thousand randy patrons per night to the two-story complex with a massive, open-air dance floor in the middle.

While the Ibiza foam parties had always been an excuse for rowdy behavior, on South Beach the transgressions were kicked up a notch, with the foam acting as a bubbly veil for topless, and sometimes bottomless, men (and, occasionally, women). “Kissing. Petting. Rubbing,” wrote the New Times, with reporter Steven Almond reporting on a conga-line of coitus. “Because the foam froths up waist high, it acts both as a lubricant and camouflage.” Amnesia’s emcee, a local-legend drag queen named Kitty Meow, would officiate over the parties, yelling at the many jock-strap-clad men to behave themselves.

This was the still height of AIDS fears in America, especially among the gay community. Eventually, with the urging of the Health Crisis Network, Di Lena had to add Safe Sex Lifeguards, musclebound men strolling around the nightclub spraying children’s squirt guns at those patrons getting a little too frisky. (Di Lena continually insisted all the complaints about his foam parties were being spread by rival club promoters, jealous of his success.) It hardly mattered.

“This is my second foam party in four days. It’s just sensational, like slithering around in a giant bubble bath,” claimed one foam fan at the time, while another bluntly noted, “From what I could see, the whole thing is basically an excuse to get fucked in public.” Or perhaps fall in love, something a future presidential candidate, Senator Marc Rubio, claims happened to him when he met his wife at a South Beach foam party in 1995 — though many have questioned the veracity of that story.

Soon, Di Lena started getting requests to bring his foam parties to other cities. He started flying his liquid and machines to New York, Chicago, and Atlanta, kicking off foam party scenes in those respective cities. Gradually, the trend began spreading to smaller, less trendy areas across the U.S.

By the late 1990s, it had jumped off the contiguous 48. “I had a buddy in Alaska who owned a club there and wanted to do a foam party,” recalls Glen Kitchin, who, back in 1999, was a construction worker and part-time DJ. “I told him, ‘I think I can help you out on that.’”

He didn’t like the available equipment at the time, finding it too loud, too messy, and a little pathetic — the foam would only go up to your ankles. He used his construction know-how to build stainless steel and aluminum machines that would overwhelm partiers with foam. He also made it smell like Piña Colada.

“I wanted something truly memorable,” he explains. “With my version, you could make people disappear all the way into the foam.”

Kitchin’s foam parties were a hit locally, but he never imagined 21 years later he would still be in the foam business. It just seemed like a one- or two-year trend. Today, however, Kitchin is known as “The Foam Guy” (motto: “Wanna get…wet?”), the founder and face behind the largest touring foam party in the nation. He’s done events in every state but Hawaii, sometimes four or five per weekend these days. In other words, he’s a true professional, with no tolerance for all the fly-by-night operators that continually spring up and ultimately hurt the industry’s reputation — and its patrons.

Like at Antalya, Turkey’s luxury Venice Hotel, where in 2008 several partiers were injured and two died when the foam caused them to get electrocuted. Or at a University of Georgia frat party where a reveler slid on the foam and destroyed her jawbone in the ensuing crash.

“The problem,” Kitchin says, “was the backyard chemist who wanted to throw something together on the cheap.”

Foam party injuries became so ubiquitous by the 2000s they were being written up in medical journals, Psychology Today, and by the Centers for Disease Control. As Dr. Howard Mell, a spokesman for the American College of Emergency Physicians, noted in 2012, “I question any party where you’re intentionally going to put together alcohol, slippery surfaces and blinding people to their visual surroundings.” Often the problems with foam parties were more mundane, though — too much foam causing short people to get lost on the dancefloor.

It wouldn’t be injuries that would eventually cause foam parties to lose their luster, however.

It would be Paris Hilton.

Fittingly, perhaps, foam parties’ shark-jumping would happen back in Ibiza, where Amnesia is now the only club still hosting them, every Sunday night. In 2013, Hilton was signed to a five-year DJing residency there, with some reports saying she was pulling in as much as $1 million per gig.

“Every single night I play in Ibiza is crazy,” she told Fox in 2015.

At her party, called “Foam & Diamonds,” she would DJ every Sunday between 4 a.m. and 6 a.m., before changing into her signature pink bedazzled Herve Leger bikini, operating a balcony-level cannon, and helping blast foam all over the party peasants below, some of whom had paid upwards of €700 per person for VIP tables.

Even with Paris’s residency over, and despite the fact that most people now consider them kinda played out, it seems foam parties will never go away, either in Ibiza or the world at large.

“Foam parties are without a doubt the most successful and popular Promotional activity within the Night-club Industry (sic),” touts the website for The Entertainment Biz, Barlow’s current company, which currently offers five different foam-generating machines, including the Colossus used at Amnesia.

Today Whincup lives in Florida and runs Galaxy Multi-Rides with his son, mainly producing unique inflatables and mechanical bulls for bars and nightclubs. Despite being long out of the foam party game, even he doesn’t see them ever going out of style.

“I think it’s one of those things that, at a certain time of your life, you’ll always want to do. It’s become a staple entertainment. I think they’ll go on for as long as there are nightclubs,” he says.

“I mean, who doesn’t want to play with bubbles?”