California cities and counties can ban marijuana shops, the state's highest court ruled Monday in a unanimous opinion likely to further diminish California's once-robust medical marijuana industry.

The California supreme court said neither the state's voter-approved law legalizing medical marijuana nor a companion measure adopted by the legislature prevent local governments from using their land use and zoning powers to prohibit storefront dispensaries.

The ruling came in a legal challenge to a ban enacted by the city of Riverside in 2010.

"While some counties and cities might consider themselves well-suited to accommodating medical marijuana dispensaries, conditions in other communities might lead to the reasonable decision that such facilities within their borders, even if carefully sited, well managed, and closely monitored, would present unacceptable local risks and burdens," justice Marvin Baxter wrote for the seven-member court.

The advocacy group Americans for Safe Access estimates another 200 jurisdictions statewide have similar prohibitions on retail pot sales. Many were enacted after the number of retail medical marijuana outlets boomed in southern California after a 2009 memo from the US Justice Department said prosecuting pot sales would be a low priority.

However, the rush to outlaw pot shops has slowed in the 21 months since the four federal prosecutors in California launched a coordinated crackdown on dispensaries by threatening to seize the property of landlords who lease space to the shops. Hundreds of dispensary operators have since been evicted or closed voluntarily.

Marijuana advocates have argued that allowing local governments to bar dispensaries thwarts the intent of the state's medical marijuana law America's first to make the drug accessible to residents with doctor's recommendations to use it.

Riverside city lawmakers used their zoning authority to declare storefront pot shops as public nuisances and ban the operations in 2010.

A number of counties and cities were awaiting the supreme court ruling before moving forward with bans of their own.

Meanwhile, an appeals court in southern California struck down Los Angeles County's two-year-old ban on dispensaries, ruling state law allows cooperatives and collectives to grow, store and distribute pot.

The decision might not be the last word on the issue, however. Pending legislation would establish a new statewide system for regulating and licensing the medical marijuana industry and clarify the role of dispensaries in it.

Activists also are in the early stages of planning a ballot initiative that would legalize the recreational use of marijuana and regulate it like alcohol, as voters in Washington and Colorado did last year.