Past the security man and his pit bull and through a haze of eye-watering smoke, two youths load up a pipe next to a row of shiny glass jars with two dozen varieties of marijuana bud displayed like candy.

Hundreds of pot shops have sprung up in the last couple of years across Los Angeles, taking advantage of California's medical marijuana laws to do a brisk trade in cannabis offerings branded with names like Big Buds and Super Trainwreck.

Roughly 1,000 marijuana dispensaries now cater to cancer patients and recreational dope smokers alike -- but city prosecutors declared war on many of them this month with threats to take action against those selling pot for profit.

A state law passed in 1996 decriminalized marijuana for medical use, and a 2003 ballot measure specified the drug could be cultivated and distributed to prescription-holding patients through nonprofit collectives.

Advocates for greater legalization have argued the 2003 initiative permits medical marijuana to be sold in storefront businesses, which have flourished since federal raids ceased after President George W. Bush left office in January.

A 2007 city moratorium on new outlets made little difference.

The new crackdown by local authorities comes as President Barack Obama has signaled a softer stance on medical marijuana, telling federal attorneys not to prosecute individual users or dispensaries in states where it has been legalized, and the country's first medical marijuana cafe has opened in Oregon.

Licensed Californian collectives that adhere to the rules say legitimate operations like theirs are being sucked into a sweep against what local prosecutors deem rogue pot shops.

We are low-hanging fruit for the cops, said the manager of a West Hollywood dispensary, as a migraine-prone movie production assistant came in to buy two quarter-ounce (seven-gram) bags of weed and a bag of marijuana lozenges.

We vet everyone who comes through the door. We play by the rules, we're grown-ups. But there's zero law enforcement, so all these rogue collectives have opened, and we are being lumped in with them, he said, declining to give his name.

California was the first of about a dozen U.S. states to decriminalize marijuana for medical purposes, and its use is less controversial in cities like San Francisco and Oakland.

Los Angeles District Attorney Steve Cooley and City Attorney Carmen Trutanich, however, say proliferation of pot shops in the second largest U.S. city has gone too far.

LAVA LAMPS TO RED EYES

There's no mention in the law that you can sell it over the counter, Joseph Esposito, head of the district attorney's narcotics division, told Reuters. The dispensaries are about clever people who looked at the law and said: 'How can I make a lot of money exploiting this?'

Dispensaries are allowed to take donations for marijuana to cover cultivation costs and overhead, but they are not supposed turn a profit or sell more than individual doses. The marijuana is supposed to be consumed at the patient's home.

The atmosphere and look of dispensaries vary considerably. Some have well-lit waiting rooms adorned with lava lamps, Asian-themed furniture and holistic medicine magazines clearly geared toward clients suffering from ill health.

I'd be a nervous wreck if I couldn't come here, said Ernie, a gaunt middle-aged man visiting an upscale West Hollywood outlet to buy pot prescribed for his back pain, insomnia, amnesia and other minor mental and physical disabilities.

Other shops reek of pot, with red-eyed smokers puffing away on pipes in dingy back rooms where erotic posters boast a menu of marijuana strains with names like Skywalker and AK-47.

I'm not a doctor. I don't ask what's wrong with people. My job is to supply them, said the manager of one shabby pot shop, where a client sported gang-style facial tattoos.

Another dispensary manager admitted most of his clients just want to get high. He said they prefer the quality and prices of his products to those on the street.

Ninety percent of people that come in have been smoking their whole lives, said the 26-year-old, giving his name as Alex. I wouldn't be in business if it wasn't for them.

I'd say 1 percent of my clients have a genuine hospital note. The other 99 percent come from these doctors who set up offices to give marijuana prescriptions all day, he added.