Although the injunction applies only to Green Oasis, the judge's ruling calls into question the city's power to enforce the moratorium against hundreds of dispensaries that have opened in the last two years. The ruling could inspire other dispensaries to join the lawsuit or file similar actions.

Green Oasis and a number of other medical marijuana collectives sued the city last month, challenging its efforts to control the dispensaries . The lawsuit argued that the City Council violated state law when it extended the ban until mid-March and that it is unconstitutionally vague.

Judge James C. Chalfant determined that the city failed to follow state law when it extended its initial moratorium. "The city cannot rely on an expired ordinance," he said.

A Superior Court judge concluded today that Los Angeles' moratorium on new medical marijuana dispensaries is invalid and granted a preliminary injunction against enforcement of the ban sought by a dispensary that had sued the city.

Despite the moratorium, the city has seen explosive growth in the number of dispensaries. Under the ban, the city allowed 186 outlets to remain open. Many more – the exact number is unknown – are operating in neighborhoods across the city, and more continue to open.

In its answer to the lawsuit, the city argued that the moratorium is not subject to the conditions and limitations of state law because it is not an ordinance dealing with zoning, but with public safety. Zoning ordinances cannot be extended beyond 24 months. The city adopted the first of two moratoriums on Aug. 1, 2007.

The judge rejected that argument.

The city also argued that a decision to issue an injunction would cause "grave irreparable harm." "This lawsuit is not just about one 'bad apple.' It is about illegally dealing marijuana," the city's answer said. "Hundreds of unlawful marijuana stores have cropped up throughout the City and will likely attempt to bootstrap their illegal operation on the outcome of this action."

Jeri Burge, an assistant city attorney, told the judge this morning that granting the injunction would "reward illegal conduct."

"You're going to open the floodgates," she said.

Robert A. Kahn, an attorney for Green Oasis, argued that the dispensary did nothing wrong, noting that, under state law, the moratorium expired 45 days after it was first enacted. "The did not believe they were violating the law," he said.

The L.A. City Council has struggled for more than two years to write a permanent ordinance to replace the temporary ban.

Dan Lutz, a co-owner of Green Oasis and president of the collective association, filed the lawsuit after the council voted to shut down his dispensary, which opened in May.

Lutz, like hundreds of other dispensary owners in Los Angeles, had filed a request with the council for an exemption from the moratorium so he could operate, but opened without permission. The council failed to act on these requests until June, an oversight that prevented city officials from taking legal steps to close the dispensaries.

-- John Hoeffel at L.A. Superior Court

Where's the weed? Times medical marijuana interactive map.

More breaking news in L.A. Now:

Shots fired at Oxnard juvenile court; gunman sought

Church pastors urging Latino organizations not to boycott census

Victim identified in fatal Valinda stabbing

Fertility doctor who treated octuplets' mom expelled by medical society

Crisis counselors at Hollywood High after football player's death

$1 billion expansion of LAX expected to win approval today

Man and woman found dead in apparent murder-suicide in Norwalk

Shooting in Northridge leaves one dead