When the Los Angeles City Council adopted its medical marijuana ordinance, it aimed to rout unscrupulous dispensary operators whose unruly customers irritated residents and operators who opened up willy-nilly across the city, ignoring a ban on new stores.

But the ordinance has snared operators who appear to have tried hard to adhere to state law and the city’s rules. Among them are some of the most politically active operators whose dispensaries are considered model operations. Last week, the city sued these dispensaries and dozens of others and asked a judge to rule that they could be shut down.

The ordinance, which went into effect in June, allowed dispensaries that registered with the city by Nov. 13, 2007, to apply to stay open, but it required them to have “the same ownership and management.” The city attorney’s office has decided that means the owners and managers must be the same people who held those positions three years ago.

When Barry Kramer opened California Patients Alliance in April 2007, he ran it alone. “I was the manager. I was the operator. I was the secretary. I was everything,” he said. Now, with about 1,500 members, the Beverly Grove dispensary has added two managers. “I can’t be here seven days a week,” Kramer said. “I don’t see any legal basis for saying a business is not allowed to expand.”

Under the city’s interpretation of the ordinance, if a dispensary’s manager died, quit or was fired and was then replaced, it must close. If the business grew and added managers, it must close. If it shrank and let managers go, it must close. If it was sold to new owners, it must close.

“It makes it completely irrational. This is life. Things happen,” said David Welch, a lawyer who represents more than 60 dispensaries. “It almost puts an impossible burden on collectives.”

Stewart Richlin, another attorney for dispensaries, noted that the city did not tell registered dispensaries in 2007 that they could not change owners or managers, and he pointed to a 2009 planning department memo that says the city “does not prohibit ownership changes.”

“This is America,” he said. “Every business can be transferred.”

The city attorney’s office said it must interpret the ordinance strictly, saying any discretion would expose the ordinance to legal attacks. “We are constantly thinking of the greater good, which is an enforceable ordinance,” said Jane Usher, a special assistant city attorney who helped draft the law and is defending it against 32 lawsuits filed by dispensaries that were ordered to shut down.

Usher said the language that the City Council adopted is unambiguous: no change in ownership, no change in management. “There was a very clear road map,” she said, “and I don’t know why dispensaries didn’t follow it, but I assume they didn’t follow it because they couldn’t.”

David and Irina Vayntrub learned last week that their dispensary, Absolute Herbal Pain Solutions, was ineligible to stay open.

“I was shocked,” said David Vayntrub, holding up a point-by-point summary of the ordinance that his wife had typed up and that he keeps on his desk. “This is in front of me every day.”

The Vayntrubs think the city disqualified their dispensary because Irina, who they said has been involved since the store opened in January 2007, is now the secretary of the board. Under the city attorney’s interpretation, that might be a management change. They are not certain, though; they said city officials did not respond to the five voice messages they left last week.

“I’m still here. Same manager. Same owner,” said David Vayntrub, who said he works at the store on South La Brea Avenue every day. “We truly tried to follow this ordinance.”

The city clerk last week notified 128 of the 169 registered dispensaries that they were ineligible to remain open. The city filed a lawsuit against the ineligible dispensaries, but they will be allowed to operate until a judge considers the suit.

According to the suit, 120 were ineligible because of management changes. Of those, 58 were disqualified solely on that basis; the others also had ownership changes and other issues.

The clerk’s office is trying to figure out how to respond to distraught dispensary operators. “I’m trying to iron that out now,” Holly Wolcott, its executive officer, said last week.

Councilman Ed Reyes, who oversaw the drafting of the ordinance, said the city needed to “stick with the letter of the law” but promised to assess the effect on dispensaries.

Some disqualified operators will be familiar to Reyes because they have been active at City Hall for years. All of them are original operators and were excluded for management changes.

Besides Kramer, they include Yamileth Bolanos, who runs PureLife Alternative Wellness Center and heads a group of about 60 original dispensaries; Michael Backes with Cornerstone Research Collective, which focuses on severely ill patients; James Shaw with Arts District Healing Center, who runs the Union of Medical Marijuana Patients; and Bill Leahy, who manages the Farmacy stores, which were started by a pharmacist, JoAnna LaForce.

“I can’t tell you how surprised we all were,” said Leahy, adding that the city is targeting registered dispensaries when it has failed to shut down numerous unauthorized outlets. “Most of them have reopened again and the city’s done very little about it.”

Some ineligible dispensaries appear to be victims of a Catch-22 or two.

Almost a year after dispensaries were required to register in Los Angeles, the state attorney general advised that they needed to be run as nonprofit collectives. Many were not. So they reorganized as nonprofit corporations, a change that replaced an owner with a board of directors. Under the city attorney’s interpretation of the ordinance, that may have disqualified them.

This summer, when the city started to determine whether the registered dispensaries were qualified to remain open, it sent them a letter asking for “the name(s) of the collective’s management.” Because the ordinance defines managers as anyone responsible for “organization, registration, supervision, or oversight,” some dispensaries included names of employees that were not on their original registration forms, which may have disqualified them.

More than a few wonder whether it was a trap. “We all knew they were looking for some slimy little technicality, and this seems to be it,” Kramer said.

Chris Fusco, a consultant who knows the ins and outs of City Hall, said that when he inquired about the letter, he was told by officials at the clerk’s office that an exact match was required. But others, including the Vayntrubs, said they were not.

“The administration of the application process is just like nothing I have ever seen or known or imagined,” Fusco said. “It’s a black curtain, and what’s behind it, no one will tell you.”

john.hoeffel@latimes.com