A Kern County judge has denied a temporary restraining order that could have prevented the county’s ban on sales of marijuana from being implemented.

The county’s ban came into full effect on Saturday, when all dispensaries that had been allowed to remain open in unincorporated Kern County areas were forced to cease operations.

The temporary restraining order came as part of a lawsuit brought forward by a group of medical cannabis dispensaries that claim Kern County’s ban violates the constitutional rights of both the dispensary owners and the patrons they serve.

“We’re saying that due process and other constitutional rights were violated,” said the group’s attorney, Abraham Labbad. “There’s so many that I can’t even name them at this point.”

The lawsuit argues that the county arbitrarily favored some dispensaries at the expense of others, violating due process.

The county has defended the ban. Kern County Planning Director Lorelei Oviatt has said the allegations in the lawsuit have “no foundation.”

The group, which calls itself Citizens Against Corruption, had previously filed the lawsuit in the U.S. Eastern District Court of California, where a judge dismissed the case largely because federal law does not recognize any protectable liberty in the cultivation, ownership or sale of marijuana.

However, the judge noted that a state court could potentially come to a different ruling.

The lawsuit was filed in Kern County Superior Court on May 9, and Citizens Against Corruption requested the court institute a stay on the county implementing the ban as the case was argued in court.

Although the judge denied the temporary restraining order, the group will seek a stay through a preliminary injunction, which has a different legal standard that must be met.

Typically, temporary restraining orders are issued when immediate action is deemed to be necessary, and preliminary injunctions are granted after a hearing in which both sides are argued.

A hearing has been set for June 7 when a judge will consider the preliminary injunction. If granted, dispensaries in Kern County could be allowed to remain open as long as the case continues.

Labbad said he did not think the stay ordered would be issued in Kern County, but hoped to have better luck on appeal.

“I don’t see how we could fail, but a lot of things in Kern County have surprised me,” he said of the case.