The American city known as a temple of coastal elites is about to get even more liberal.

Los Angeles — home to sun, surf, palm trees, progressive bubbles, and Hollywood — will become the nation’s largest city with recreational marijuana after the City Council voted Wednesday to license sales next year.

After months of debate and political snags, the council approved rules to usher in commercial sales and cultivation set to begin in less than a month under an initiative approved by state voters.

Under the Los Angeles regulations, residential neighborhoods would be largely off-limits to marijuana businesses, and buffer zones would be set up around schools, libraries and parks.

However, with the new year just weeks away — and the holidays coming — industry experts say it’s not clear how many businesses, if any, will be ready to open their doors on Jan. 1 to hordes of anxious customers.

If demand is not satisfied in the legal market then “you are just giving oxygen to the black market we all want to eradicate,” said Adam Spiker, executive director of the Southern California Coalition, a cannabis industry group.

California is among 29 states where marijuana is legal, either for medical or recreational use.

Los Angeles, home to 4 million people, long has been an unruly frontier in the marijuana industry, where hundreds of illegal dispensaries and cultivators proliferated.

Medical marijuana has been legal in the state for two decades.

The dense set of regulations passed Wednesday dictate where marijuana can be grown and sold in the new marketplace, along with how businesses will be licensed.

Businesses that want to participate in the marketplace need local permits before they can apply for state licenses required to operate in 2018.

“As lawmakers we have a responsibility to reasonably regulate this industry in a manner that is safe, inclusive, and practical,” Los Angeles City Council President Herb J. Wesson Jr. said Wednesday.

The state and hundreds of cities are faced with the challenging task of trying to govern the vast, emerging industry with a projected value of $7 billion. Some places have banned all commercial marijuana activity, while other are embracing it.

Earlier this year, city voters endorsed another attempt to regulate the local marijuana businesses, leading to the new rules.

The legal marketplace is seen as a way to impose order, hopefully squeezing out illegal operators while raising a cascade of new taxes for City Hall.

In the background is widespread uncertainty about whether the Trump administration will attempt to intervene in states where marijuana is legal.

Because marijuana is illegal in the eyes of the federal government, many major banks are leery to do business with dispensaries and growers, so much of the business is conducted in cash.

The Associated Press contributed to this report.