SALEM, Ore. (AP) — Some 30 counties and cities in Oregon approved some type of marijuana businesses in last week’s election, and officials in those communities now must establish rules for every step in the production and supply chain.

When voters legalized recreational cannabis statewide two years ago, the communities — from the cowboy town of Pendleton to Sweet Home in the Willamette Valley — opted out. But many switched it up this month, voting to allow at least some form of the cannabis industry, including medical marijuana.

“No one has done this in Oregon since liquor Prohibition,” said Scott Winkels, a lobbyist with the League of Oregon Cities. “This is the first time we’ve had to step in and develop and regulate a marketplace for a controlled substance since 1933.”

Local officials must determine operating hours for cannabis retailers, growing farms and processors. They also were trying to figure out whether the businesses should be allowed near parks and what sort of security and odor controls the businesses must provide.

The rule-setting also was happening in other states that have legalized recreational marijuana.

RELATED STORY

California Legalization Creates Accidental Tax Holiday for Patients

In California, which approved adult-use cannabis last week, the San Jose City Council imposed a temporary ban — including on outdoor gardens — to give officials time to develop regulations for sales and farming.

In Colorado, where voters passed legalization in 2012, the rules were still being tweaked.

This month, Denver became the first U.S. city to allow people to use cannabis in bars and restaurants, though state licensing officials announced a rule Friday that prohibits businesses with liquor licenses from allowing cannabis consumption on their premises. The move strikes a major blow to the voter-passed initiative.

In Oregon, the Liquor Control Commission didn’t begin finalizing regulations and licensing businesses until this year. The communities that approved cannabis businesses on Election Day are now starting to look at regulations.

“Most have been borrowing from each other,” said Rob Bovett, legal counsel of Association of Oregon Counties, describing efforts to establish ordinances.

RELATED STORY

Trump Picks Jeff Sessions as Attorney General, Stoking Fears of Cannabis Crackdown

Opt-in ballot measures go into effect in January, Bovett said. If the jurisdictions want to reap the tax benefits at the earliest opportunity, they should have the regulations finalized before then so marijuana companies can seek licenses and start doing business, liquor commission spokesman Mark Pettinger said.

The League of Oregon Cities has drawn up a guide to help struggling local officials.

It says cities may impose restrictions on the hours of operation and the locations of producers, processors, wholesalers, as well as retailers and medical marijuana grow sites, processing sites and dispensaries. They may also regulate public access and how the businesses operate.

“Probably most cities will use (the guide) as a template,” Winkels said. “The easiest way is to cut and paste the ordinance in … though some will probably be making local adjustments.”

Robert Snyder, lawyer for the town of Sweet Home, said forming the rules is “going to take work” and that it will be up to the city council to decide whether to get public input.

One marijuana ballot measure that passed last week imposed a 3 percent local sales tax on marijuana products, on top of a 17 percent state sales tax, Bovett said.

Even counties and cities that decided to prohibit cannabis businesses hedged their bets by approving the additional tax so they can be prepared to impose it if voters eventually say yes to legal cannabis.

“All (of Oregon’s) 111 cities and counties voted yes on the local tax,” Bovett said.