A year-long saga of changing compliance deadlines for 50 medical marijuana shops allowed to operate unlicensed is over.

Court of Claims Judge Stephen Borrello ordered Tuesday that Michigan regulators cannot set any new compliance deadline for unlicensed pot shops.

In his 12-page opinion, Borrello chastised officials in the Department of Licensing and Regulatory Affairs for being “ill-equipped” to handle the licensing process in a timely manner -- which has led to the current market of unlicensed businesses.

“At the outset, the Court notes that LARA’s entire method of handling license applications has been ‘apt to sudden change, freakish, or whimsical,’” Borrello wrote.

Temporarily operating provisioning centers will be allowed to operate until their license applications are considered by the state -- and officials can only ask them to shut down 60 days after their license application has been denied, Borrello ordered in a ruling that affects eight consolidated cases.

Borrello has left the issue of whether caregiver marijuana can be used to supply the licensed market up to the state to decide.

The state’s new Marijuana Regulatory Agency is reviewing the court orders before issuing a statement, said David Harns, spokesman for the agency.

The state has been trying to hold unlicensed businesses to a licensing deadline since June 2018 but have been thwarted by court orders. Borrello has previously extended the deadline. The most recent attempt to enforce a deadline was brought forward by Governor Gretchen Whitmer, who had proposed March 31 -- but another barrage of last-minute legal filings from medical marijuana businesses stopped that under a ruling from Borrello.

Borrello said the changing compliance deadline has been a “bait-and-switch” for unlicensed pot shops, and has been changed without any regard for the status of their license applications.

“However, the state failed to provide any rationale for how the continuous setting of looming deadlines promotes a more regulated market. And to the extent that the state might continue with this variation on a theme, such deadlines, enacted under the misleading guise of proper regulation, will likely continue to be constitutionally infirm as well,” Borrello wrote.

Michigan’s medical marijuana market is in turmoil.

There’s a major divide in the industry between licensed medical marijuana businesses and caregivers, who the state has allowed to supplement the stock on provisioning center shelves. The tension played out in full force in Borrello’s courtroom, and with counter-protests on the steps of the capitol building last week in Lansing.

Tuesday, Borrello denied motions in a lawsuit filed by two corporate medical marijuana growers -- VB Chesaning (High Life Farms) and Green Peak Innovations. The mega growers sought to force the state to abide by the law and to cut out caregivers from the regulated supply chain.

-- Amy Biolchini is the marijuana beat reporter for MLive. Contact her with questions, tips or comments at abiolch1@mlive.com. Read more from MLive about medical marijuana.