The Los Angeles City Council is plainly out of its depth when it comes to regulating medical marijuana. This was already clear after years of fumbling and court-delayed attempts to limit the number or locations of cannabis dispensaries, but it became painfully obvious Tuesday when the council approved a ban on all dispensaries — along with a separate motion to draft an ordinance that would allow well-established pot shops to stay open, partially defeating the council’s own purpose.

Not that we can really blame the council for being confused. We’re confused about how to legally restrict a quasi-legal business too. For that matter, so is the entire state of California. And that’s causing even bigger problems than usual as the federal government, which considers marijuana an illegal drug, has begun a series of raids on California pot outlets.

Is L.A.'s new ban even legal? There’s no clear answer to that question, but a recent court ruling suggests that it isn’t. After Los Angeles County imposed a blanket ban on pot distribution in unincorporated areas in December 2010, it was challenged by a Covina collective, which won a key victory this month in the state’s 2nd District Court of Appeal. Writing for the three-justice panel, Justice Robert Mallano said the county’s ban was preempted by state law and contradicted the intent of the Legislature.

VIDEO: L.A. City Council votes to ban pot shops


Of course, it isn’t that simple. The Los Angeles County ban would have closed all distribution outlets, whereas the city of L.A.'s ban would allow small collectives with three or fewer members to stay open. The city’s lawyers say that key difference should persuade the courts to approve L.A.'s “gentle ban,” and as ammunition they point to a separate ruling by a different 2nd District Court justice that suggested the city’s approach would neither constitute a true ban nor violate state law.

If thinking about all that isn’t enough to give you a migraine — which, on the plus side, is enough justification to get a medical recommendation for a dose of cannabis in California — there is the added complication that could arise if the City Council goes ahead with the separate ordinance to allow certain dispensaries to stay open. Specifically, Councilman Paul Koretz called Tuesday for staff to draw up a draft that would grant immunity from the ban to those facilities that were in place before a 2007 city moratorium on new dispensaries was approved. This brings up unhappy memories of L.A.'s years-long attempts to regulate billboards, when strict regulatory ordinances were undermined by council members carving out exemptions for certain signs in their districts. Courts tend to take a dim view of that kind of favoritism.

So let’s review: L.A. has banned all but the tiniest marijuana collectives. When it attempts to enforce this ban, it will be sued. Action will be delayed for months, or quite possibly until the state Supreme Court weighs in on a series of marijuana cases next year. Mission accomplished?