The California Supreme Court ruled Monday that local municipalities can legally ban medical marijuana dispensaries, dealing a massive blow to the burgeoning industry that's exploded across the state since 2009.

The ruling in City of Riverside v. Inland Empire Patient's Health and Wellness Center (PDF) boils down to whether the California constitution trumps provisions in the state's medical marijuana laws.

The California constitution gives cities the zoning power to dictate land use within their borders, enabling them to declare businesses a "public nuisance" and toss them out -- which is precisely what happened to the Inland Empire dispensary in Riverside.

Lower courts consistently sided with the city, saying that nothing in the Compassionate Use Act (CUA) or the Medical Marijuana Program (MMP) laws actually prohibits cities from banning marijuana businesses.

The state's Supreme Court agreed on Monday, saying that California's medical marijuana laws "merely declare that the conduct they describe cannot lead to arrest or conviction, or be abated as a nuisance, as violations of enumerated provisions of the Health and Safety Code."

"Nothing in the CUA or the MMP expressly or impliedly limits the inherent authority of a local jurisdiction, by its own ordinances, to regulate the use of its land, including the authority to provide that facilities for the distribution of medical marijuana will not be permitted to operate within its borders," the justices added.

Drug reform advocacy group Americans for Safe Access estimates that more than 200 California municipalities have banned medical marijuana storefronts. Just 50 localities have adopted local regulations governing the medical marijuana business.

“It is time for the state legislature to enact state-wide medical marijuana oversight and regulation that both protects patient access and eases the burden on localities to deal with this issue on their own," Drug Policy Alliance attorney Tamar Todd said in an advisory. "Localities will stop enacting bans once the state has stepped up and assumed its responsibility to regulate."