“I am under no illusions that everyone out there is following the rules,” said Mr. Duncan, who runs his own dispensary in West Hollywood. “But just because you accept money to reimburse collectives does not mean you’re making profits.”

For marijuana advocates, Los Angeles represents a critical juncture  a symbol of the movement’s greatest success, but also its vulnerability.

More than 300,000 doctors’ referrals for medical cannabis are on file, the bulk of them from Los Angeles, according to Americans for Safe Access. The movement has had a string of successes in the Legislature and at the ballot box. In the city of Garden Grove, marijuana advocates forced the Highway Patrol to return six grams of marijuana it had confiscated from an eligible user. About 40 cities and counties have medical marijuana ordinances.

But there have also been setbacks. In June, a federal judge sentenced Charles C. Lynch, a dispensary owner north of Santa Barbara, to one year in prison for selling marijuana to a 17-year-old boy whose father had testified that they sought out medical marijuana for his son’s chronic pain. The mayor and the chief of police testified on behalf of Mr. Lynch, who was released on bail pending appeal.

And last month, San Diego police officers and sheriff’s deputies, along with agents from the Drug Enforcement Administration, raided 14 marijuana dispensaries and arrested 31 people. In an interview, Bonnie Dumanis, the district attorney for San Diego County, said that state laws governing medical marijuana were unclear and that the city had not yet instituted new regulations.

Ms. Dumanis said that she approved of medical marijuana clubs where patients grow and use their own marijuana, but that none of the 60 or so dispensaries in the county operated that way.

Image Credit... Monica Almeida/The New York Times

“These guys are drug dealers,” she said of the 14 that were raided. “I said publicly, if anyone thinks we’re casting too big a net and we get a legitimate patient or a lawful collective, then show us your taxes, your business license, your incorporation papers, your filings with the Department of Corporations.”