A judge has temporarily barred Los Angeles from enforcing a moratorium on medical marijuana clinics.

Superior Court Judge James C. Chalfant on Monday granted a preliminary injunction sought by Green Oasis, a medical marijunana collective that sued last month.

The judge ruled that the City Council failed to follow state law when it extended an initial ban on new dispensaries.

The injunction only applies to Green Oasis but it could inspire other dispensaries to sue.

Hundreds of marijuana facilities have opened in the city in recent years. The city ban permitted only 186 to operate.