A judge issued a ruling Friday banning Los Angeles from enforcing a moratorium on new medical marijuana dispensaries.

The city council approved the moratorium this year. But the ordinance said dispensaries must have registered no later than Nov. 13, 2007, to operate legally.

Superior Court Judge Anthony Mohr called the deadline "arbitrary and capricious" because the registration requirement had expired by November 2007, the Los Angeles Times reported.

"The justification for using that date as a bright line was compromised, if not confounded, by the fact that it was unnecessary to register," he wrote. "The requirement had ceased almost two months earlier, and no one could have anticipated that compliance with a dead statute would be necessary in order to continue as a collective three years later."

The council adopted the moratorium because dispensaries had been sprouting up, some with doctors on the premises prepared to write letters authorizing marijuana use to walk-in patients. Mohr acknowledged his decision is likely to mean the quick opening of many new stores.