Four dispensaries failed Wednesday to win a court order to stop Los Angeles from shutting them down when the city’s medical marijuana ordinance takes effect June 7, a decision that suggests officials may not be impeded in their plans to start enforcing the long-awaited law.

City officials had feared a victory would encourage numerous dispensaries to seek similar court orders. “The floodgates have been closed,” said Jane Usher, a special assistant city attorney.

Los Angeles County Superior Court Judge David P. Yaffe denied the motions for temporary restraining orders, rejecting arguments from David Welch, the attorney for the dispensaries, that the operators could suffer irreparable harm from daily fines and arrest.

“The temporary restraining order is denied, again, and for the last time,” Yaffe said.

The judge set a hearing on an injunction for June 18, dismissing concerns from Welch and the city’s attorneys that the issue should be decided before June 7.

The dispensaries nearly won their restraining orders earlier in the day from Judge James C. Chalfant, who has criticized the city’s handling of dispensaries and insisted it would be wrong to prosecute the operators before their motion for an injunction was heard. “We can’t have these people go to jail,” he said.

But Chalfant could not schedule a timely hearing and transferred the cases to Yaffe.

The dispensaries are among 44 that filed two lawsuits challenging the ordinance, which allows only facilities that registered by Nov. 13, 2007, to continue to operate. City officials estimate that 137 qualify to stay in business, and about 450 will have to shut down.

Chalfant said the cutoff date did not seem rational, but Yaffe appeared less skeptical.

The city also faces nine lawsuits filed this week by attorney Stewart Richlin, who intends to seek court orders to halt enforcement of the ordinance.

“I think that an intelligent judge looking at the facts objectively will agree that the city is applying a different standard to this process because of reefer madness,” he said.

Eric Shevin, another attorney, plans to file a lawsuit soon on behalf of medical marijuana patients and also pursue an order that would bar the city from enforcing the ordinance.

john.hoeffel@latimes.com