Los Angeles city officials announced Wednesday that only 41 medical marijuana dispensaries are eligible to stay in business under the city’s restrictive ordinance, a number so low that the city will suspend the winnowing process and ask a judge to rule that it is legal.

“It was a surprise,” said Jane Usher, a special assistant city attorney who worked closely with the City Council to draft the complex law and is defending it in court.

Rather than move ahead with a selection process that would clearly trigger a spate of lawsuits by disqualified dispensaries, the city attorney’s office decided to sue them first and ask a Los Angeles County Superior Court judge to determine that the city’s process was appropriate.

“We’re trying to be proactive,” Usher said.

Yamileth Bolanos, who runs PureLife Alternative Wellness Center, found out that the city had determined her dispensary was not eligible to continue to operate. “I’m not going to take this lying down,” she said. “This is ridiculous. They have screwed up one thing after another. Not once have they thought about the patients of Los Angeles.”

Los Angeles is already tangling with about 85 dispensaries that have filed almost 30 lawsuits challenging the procedure the City Council adopted Jan. 26 to limit the number of dispensaries. Most of the dispensaries that have sued are among more than 400 ordered to shut down.

The city experienced a dizzying increase in the number of dispensaries when it failed to enforce a pot-shop moratorium put in place in 2007. Under that ban, only 186 dispensaries were approved to operate, but hundreds opened, a trend that accelerated after the Obama administration indicated last spring that it would not raid dispensaries complying with state law.

Judge Anthony J. Mohr is presiding over all the lawsuits and has set a Sept. 21 hearing on constitutional issues. It is unclear how quickly Mohr might act on the lawsuit, which the city attorney’s office intends to file Thursday.

“The judge has considered things very expeditiously to date,” Usher said. “He seems to have a very keen awareness of the harm it causes to the community to leave this unaddressed.”

When the City Council passed the ordinance, it acted on an estimate that about 130 dispensaries might qualify to stay open. Under the ordinance, however, if the number dropped below 70, additional dispensaries would be chosen in a lottery. The total number of dispensaries in the city would then be capped at 70.

City officials said 169 dispensaries applied to be allowed to remain in operation, but 128 failed to meet the stringent criteria. The city clerk's office mailed letters Wednesday to each dispensary notifying it of its status and also posted the list on the office's website. [Corrected at 8:50 p.m.: A previous version of this post said 170 dispensaries applied to remain in operation.]

The ordinance, which became effective June 7, allowed only those dispensaries that had registered by Nov. 13, 2007, to operate during the moratorium. But they also had to show that the ownership and management had not changed, that the management had no major criminal record and that the dispensary was at its original location, or had moved just once after being evicted by landlords who received warning letters from the Drug Enforcement Administration.

“We took a very strict interpretation of the ordinance, and if it didn’t match the ordinance exactly, then we declared them ineligible,” said Holly Wolcott, executive officer for the city clerk.

The city will not seek to shut down the disqualified dispensaries before a court ruling. “As of Tuesday,” Usher said, “the entities that filed notices of intent to register and who fully comply with state law will not be prosecuted under the city’s ordinance.”