Updated at the bottom with L.A. City Attorney Carmen Trutanich's pleased reaction. First posted at 8:01 a.m.

The city of L.A. has had a hard time regulating pot shops which, some have said, outnumber Starbucks in this fair town.

The City Council passed a slate of rules that basically outlawed all but 100 or so dispensaries, but many remain open and defiant, and a few lawsuits continue to challenge City Hall on its cannabis-regulating authority.

But a bill just signed into law by one Gov. Jerry Brown (and you call him “Moonbeam”) could change L.A.'s weed-retail landscape for good:

AB 1300 puts the full force of the state of California behind L.A.'s ability to say when, where and how you can sell medical bud. In fact, the law says cities and counties can even ban pot shops outright. Some already do, but that stance has often brought the matter to court.

Brown signed it into law Wednesday. Judges have some pretty good guidelines under AB 1300 when deciding if a town has the right to snuff out your friendly neighborhood bud boutique.

Marijuana backers such as Americans for Safe Access were opposed, stating:

AB 1300 will explicitly allow cities and counties to ban medical cannabis cooperatives and collectives – even if we win ongoing court battles. This bill will add momentum to the anti-medical cannabis lobby and increase the number of communities with no access to medical cannabis.

L.A. City Attorney Carmen Trutanich, who has vowed to put illicit pot shops in L.A. out of business, supported the bill.

And there are many a city that will use this law to continue to ban weed retailers within their borders outright.

Ironically, in that light, L.A. is a pretty pot-friendly town.

Of course, there's always the possibility that full-legalization will head back to the ballot in California. That could open things back up, or leave them as-is. Prop. 19, which came close to legalizing weed in the Golden State last year, would have done the same thing AB 1300 does: let local towns decide where you can sell it.

Update: L.A. City Attorney Carmen Trutanich is happier than a stoner at 4:20 p.m. His spokesman, Frank Mateljan, sent out this statement today:

City Attorney Carmen Trutanich today praised the Governor Jerry Brown for signing AB 1300, legislation sponsored by the City Attorney's Office authorizing local jurisdictions to use criminal and civil penalties to regulate the location and operation of medical marijuana collectives.

AB 1300, authored by Assemblymember Bob Blumenfield (D-San Fernando Valley), was approved by the State Senate on a vote of 38-0. The legislation was previously approved by the California Assembly on a 71-0 vote. Now signed by the Governor, the legislation will go into effect January 1, 2012.

AB 1300 will allow cities and counties to adopt ordinances to regulate medical marijuana cooperatives and collectives to protect the health and safety of the patients, who need safe access to medicine, and the residents, who live in neighborhoods impacted and surrounded by such facilities. Specifically, AB 1300 would amend the California Health and Safety Code to conform and clarify the authority of local jurisdictions to criminally and civilly enforce regulations on the location, operation, and establishment of medical marijuana cooperatives or collectives.

[@dennisjromero/djromero@laweekly.com]

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