Updated after the jump with emergency rules being considered by the City Council. First posted at 5:15 p.m.

Speak of the devil. Much of the pot shop ordinance that the Los Angeles City Council took so long to finally get on the books was blocked by a judge Friday afternoon, meaning many pot shops that found themselves in violation of the law could instantly be legal again. Yay, stoners!

A Superior Court judge just said no to most of the city's cannabis-store rules, saying that when the genius council extended a filing deadline for shops that wanted to stay open during a 2007 moratorium it confused the weed-business community and thus deprived would-be bud entrepreneurs of their rights to sell that buddha.

Added:

We're confused. Are you?

The judge told the city not to enforce its ordinance, meaning (at least according our own interpretation) that pot shops could re-open and proliferate again, maybe even to the pre-ordinance high of nearly 550 of them citywide.

In fact, the judge, Anthony Mohr, said as much.

So there you go. Sell weed. To sick people.

The city hasn't been able to get this thing right since before 2007, when its moratorium on new shops backfired and many opened under legal loopholes.

In June it put its pot-shop ordinance on the books in an attempt to whittle the number down to 180 or so.

It allowed those shops that were open before the moratorium to qualify to stay open, but they had to abide by strict rules that included continuous managers/operators since that time and being at least 1,000 feet away from schools, parks and churches.

Some shops defied the rules and stayed open, others closed their doors and sold weed out the back, and some went mobile, offering delivery.

At one point the City Attorney even backed off of enforcement, leaving illegal shops to continue doing their thing.

The Los Angeles Times crunched the numbers and discovered that, with those hoops to jump through, only about 40 pot shops would survive.

The City Council said oops, went back to the drawing board and recently tweaked the ordinance so that the continuous-management provision wasn't so strict.

But now it looks like we're back to square one.

Update: Councilman Ed Reyes said he would recommend “emergency legislation'' during Monday's council meeting that would prevent illegal dispensaries from opening.

-With reporting from City News Service. Got news? Email us. Follow us on Twitter, too: @dennisjromero.

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.