A New York judge has temporarily blocked the state from issuing retail marijuana licenses after a lawsuit from four veterans who argue that regulators are wrongly prioritizing applicants with drug convictions.

New York Supreme Court Justice Kevin Bryant issued the temporary restraining order Monday halting the state from issuing or processing marijuana dispensary licenses.

The order is the latest legal setback for the state's fledgling marijuana market, which has been beset by a slow rollout critics have blamed on a cumbersome process designed to give the first round of licenses to people with prior drug convictions or to certain types of nonprofit groups.

The attorney general's office, in a court filing, has cautioned that halting the program will financially hurt retailers who are spending money to set up shop under provisional licenses. The state is not expected to issue new licenses until at least September when a cannabis regulatory board is set to meet, the attorney general's office said in a filing last week.

Oral arguments in the case are scheduled for Friday in Kingston, New York.

NEW YORK JUDGE PRESIDING OVER DONALD TRUMP CRIMINAL CASE GETS DEATH THREATS

NY Fox News graphic

A temporary block has been placed on New York retail marijuana licenses following a lawsuit that was filed by four veterans. 

CLICK HERE TO GET THE FOX NEWS APP

The veterans' lawsuit alleges the state's Office of Cannabis Management created a licensing system that is at odds with the state's recreational marijuana law, improperly limiting initial licenses to people with drug convictions rather than a wider category of so-called social equity applicants.

The order halting the state's program comes after regulators voted in May to settle a federal lawsuit that blocked them from issuing licenses in the Finger Lakes region. That suit was filed by a company owned by a Michigan resident who said New York's licensing system unconstitutionally favors New Yorkers over out-of-state residents.

Separately, state regulators last month approved the sale of marijuana at festivals and other events after farmers complained that there aren't enough legal dispensaries in the state to handle their harvests.

As the state's legal licensing program has stalled, authorities have begun to shut down a glut of illegal marijuana shops that have cropped up as unlicensed sellers move to fill the vacuum.