After years of wrangling and foot-dragging the Los Angeles City Council on Tuesday gave final approval to a law that would essentially shut down nearly 475 medical marijuana dispensaries in the city while allowing another 137 or so to remain open.

The ordinance has a final goal of capping the number of pot shops in the city at 70 as remaining shops close, go out of business or run astray of the law. The ordinance requires a 1,000 foot buffer between the stores and schools, churches and rehab centers; it limits hours of operation to 10 a.m. to 8 p.m.; operators can only have one dispensary in the city and have to have a clean, 10-year criminal record; and the shops cannot operate on a for-profit basis — money exchanged must be go “toward the collective's actual expenses for the growth, cultivation and provision of medical marijuana,” and annual audits will keep watch.

Additionally, dispensaries cannot be “on a lot abutting, across the street or alley from, or having a common corner with a residentially zoned lot or a lot improved with residential use.''

Those dispensaries allowed to remain open had begun their operations before a 2007 temporary moratorium was enacted by the council. That moratorium had a huge loophole that inspired even more dispensaries to open, however, and it was eventually struck down in court. The City Council had been struggling since then with ways to regulate the industry as shops opened up by the dozen, concentrating heavily in neighborhoods like Venice, South Robertson and Van Nuys.

As we told you previously, groups including the Los Angeles Collective Association and attorney Bruce Margolin told us they would likely end up in court to challenge the law, so don't hold your breath.

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