BIDDEFORD — First responders and code enforcement inspectors have come across dozens of marijuana plants growing legally in apartments and houses across the city. But in late April they came across something new – and potentially dangerous – while putting out a fire in a downtown apartment building.

In the kitchen of a third-floor apartment sat a large metal cylinder filled with marijuana, attached by tubes to tanks of butane and refrigerant. The owner of the equipment was using it to illegally manufacture butane hash oil, a concentrate used to make a variety of products that are increasingly popular with people looking for alternative ways to consume cannabis.

A small leak in the tube and a single spark could have led to a flash fire and devastating consequences, said Roby Fecteau, the city’s code enforcement officer.

“If that fire had spread to the third floor, it would have been bad. It’s very, very dangerous,” he said. “It’s only a matter of time before we start seeing more of this.”

Because Biddeford officials had never encountered someone making butane hash oil in an apartment building and didn’t know how to safely dismantle the equipment, they called for assistance from drug agents. And last week, the city held a training session for 50 public safety employees with federal drug agents to learn how to identify and mitigate the danger when they encounter illegal manufacturing with dangerous chemicals.

Extracting concentrates from marijuana is not new – and it doesn’t always involve dangerous solvents – but public safety officials worry that more people will try hazardous methods now that marijuana use is legal in Maine. The adult recreational-use law prohibits home extraction using inherently hazardous substances such as butane and propane, but State Fire Marshal Joe Thomas said that won’t necessarily stop people.

“After 40 years in the fire service, I’ve learned that people are going to do it no matter what,” he said.

In January, the Office of State Fire Marshal was called to Ellsworth when a person was severely burned during a flash fire while manufacturing butane hash oil. A space heater ignited the butane and the person suffered second- and third-degree burns, Thomas said.

“It’s a preview of coming attractions,” he said.

Despite the risks involved, processing marijuana products is one of the fastest-growing sections of the marijuana industry. In states where adult-use cannabis is legal, edibles made from concentrates represent 10 percent of the total market.

“There is a huge market demand for concentrates,” said Hannah King, an attorney with DrummondWoodsum who focuses on cannabis issues. “In places where marijuana is legal, you see the market shift from flower to concentrate-based products. It’s part of the industry that is certainly not going away.”

Under the law for adult use, commercial manufacturers will need to be licensed and follow rules still to be developed by the state.

In recent months, lawmakers worked on establishing licenses and regulations for suppliers of medical marijuana who use explosive chemicals or gases to extract concentrates. A bill to amend the medical marijuana law to address extraction was carried over to the next legislative session, and it’s unclear when, or if, lawmakers will take it up again.

Medical marijuana processing began with patients who didn’t want to smoke their medicine and preferred odorless topicals, smokeless vaping or ingestible foods, oils or tinctures. Caregivers who specialize in extracting oils from cannabis use solvents to strip away anything from the plant they don’t want and leave them with the concentrated parts they do, like the psychoactive element THC or the cannabinoid CBD. They put the oils in capsules, vaporizers or food.

Explosions can occur as people pump butane fuel through a tube packed with marijuana plants to draw out THC and produce the highly potent concentrate that is known by various names, including hash oil, shatter and wax. The process can fill a room with volatile butane vapors that may be ignited by a flame or spark.

In 2014, there were 32 blasts associated with extraction labs in Colorado, injuring 17 people and prompting lawmakers in that state to make home extraction a felony. Dramatic videos posted online show houses with blown-out walls and processors being thrown across rooms by flash fires.

A federal DEA team participates in training to show about 50 public safety workers how to identify and mitigate the danger when they encounter drug labs using volatile chemicals. Photo courtesy of Biddeford Police Department

Chris Witherell, a professional engineer who does extraction facility certifications in 15 states, including Colorado and Maine, said extraction using chemicals such as butane is “certainly more dangerous than people think.”

“When people do this at home, there’s a whole bunch of things that can go wrong,” he said.

In certified facilities, processors have a dedicated extraction room with no ignition sources, hazardous exhaust systems to circulate air, and gas detection systems. Outside of those facilities, some people get into trouble when they use faulty equipment or make their own extraction equipment using pipes they buy at the hardware store, Witherell said.

“It’s dangerous and it’s not something you should do at home. We’ve seen people buy this stuff that’s not safe and they get a fire or explosion and it takes out half the house,” he said. “When these accidents happen, there is no time to react.”

Thomas said a handful of communities have reached out to him in the past year about fire safety issues related to marijuana, including about extraction labs. Local officials are learning about new aspects of the marijuana industry while developing local ordinances to address safety concerns, he said.

Maine is in the process of adopting the latest version of the national fire code, which adds a chapter dealing exclusively with marijuana growing and extraction facilities. The chapter includes standards specific to the extraction process, including ventilation and equipment.