California’s medical marijuana industry may soon be craving pain relief instead of selling it.

The state Legislature recently passed the Medical Marijuana Regulation and Safety Act, a combination of three laws that together will impose a massive, multi-agency regulatory framework on the cultivation, distribution and sale of cannabis.

Nate Bradley, executive director of the California Cannabis Industry Association, said his group lobbied Sacramento for “sensible regulations.” In a panel discussion presented by the Republican Liberty Caucus of California at the recent state GOP convention, Bradley said he tells his members it’s better than “having your doors kicked in.”

The new laws abolish collectives and cooperatives. Instead there will be state licenses for commercial growers, distributors and sellers, and additional licenses required in cities and counties that choose to be “wet” jurisdictions instead of “dry.”

The Wild West days are over. From now on, the medical marijuana industry will have to answer to the Department of Fish and Wildlife, the State Water Resources Control Board, the Department of Food and Agriculture, the Board of Equalization, the Department of Public Health, the Department of Consumer Affairs, Cal OSHA, the Department of Pesticide Regulation and the new chief of the Bureau of Medical Marijuana Regulation.

Growers will be assessed fees and fines for any impact on streams, rivers, lakes, fish or wildlife. They’ll be required to label each plant with a government-assigned “unique identifier,” part of a “track and trace” program that follows every product from seed to sale.

Weighing and measuring devices will be strictly regulated. Facilities will be required to have adequate security systems to prevent theft. New tax reporting requirements will log the movement of commercial cannabis and cannabis products through the distribution chain, capturing names, addresses, license numbers, transaction dates and taxes due.

There will be new regulations for production and labeling, pesticide standards, requirements for inspections, batch testing and tamper-evident packaging, workplace safety standards, and enforcement measures against doctors who engage in “excessive recommending.”

And unions have entered the picture. Licensed facilities with more than 20 employees will be required to enter into a “labor peace agreement” and all growers are required to use a “licensed transporter” to get their products to the market.

All government departments may charge fees to cover the cost of implementing the new regulations, and that’s on top of license fees and taxes.

Welcome to California.

The new laws have complicated plans for a 2016 ballot initiative to legalize marijuana completely. Dale Gieringer, director of the California chapter of the National Organization for the Reform of Marijuana Laws (NORML), said two teams of lawyers are working on drafting the language for the initiative, which now has to be written “over” the new medical marijuana regulations.

But the regulations may not survive in court. A lawsuit announced by the American Medical Marijuana Association says the new laws illegally modify Proposition 215, the voter initiative which legalized medical marijuana in 1996.

Making the situation even more tangled, marijuana remains illegal under federal law. That means a licensed California business can comply with environmental and health regulations, safety and packaging rules, union contracts, tax collections, and laws against marketing to children — and still have the doors kicked in by federal agents.

Here’s a prediction: This story ends with a thriving, statewide, tax-free, illegal drug trade.

Or, as the Sundance Kid said to Butch Cassidy, “Well, we’ve gone straight. What do we try now?”