Less than three hours before a 5 p.m. deadline, Gov. Rick Scott’s administration Friday filed a notice to appeal a Tallahassee judge’s order that struck down a 2017 medical marijuana law as unconstitutional.

The notice, filed at 2:36 p.m. Friday, came after Scott sought support from Republican legislators and the state’s marijuana operators to appeal Leon County Circuit Judge Charles Dodson’s decision that the 2017 law ran afoul of a voter-approved constitutional amendment.

“The governor has directed the Department of Health to appeal this ruling after hearing from the Legislature, which is responsible for creating laws, not the judiciary,” Scott spokesman John Tupps said in an email Friday afternoon.

Most industry insiders had remained skeptical that Scott would allow the deadline to lapse without notifying the court he intended to appeal. But a delay by the governor’s office in filing the notice sparked a frenzy of activity throughout the week.

The appeal comes amid a heated campaign in which Scott, a Republican finishing out his final few months as governor, is attempting to unseat Democratic U.S. Sen. Bill Nelson.

Dodson had given state health officials until Friday to begin registering new medical-marijuana operators after deciding the law, passed during a special legislative session last year, failed to properly carry out a 2016 constitutional amendment that broadly legalized medical marijuana.

The circuit judge found fault with parts of the law that, among other things, capped the number of marijuana licenses and created a “vertical integration” system that requires marijuana operators to grow, and process cannabis and distribute related products. Already-licensed operators worried that the ruling could create uncertainty in the fast-growing industry — while also allowing more companies to receive licenses.

Dodson’s decision came in a challenge filed by Tampa-based Florigrown LLC, which was denied a license by the state and is owned in part by strip-club owner Joe Redner.

Redner, who also got a victory against the state health department in a separate medical-marijuana case now under appeal, called Scott’s decision to appeal Friday “a travesty of justice.”

Numerous sources close to key legislators and the Scott administration told The News Service of Florida this week that the governor’s office requested that the House and Senate formally ask Scott to appeal the judge’s decision in the Florigrown case.

State lawmakers scurried to urge the governor to get Dodson’s decision reviewed by the 1st District Court of Appeal, a venue with a history of being friendlier than the circuit court toward the Scott administration and the Republican-dominated Legislature.Two of the state’s 14 licensed medical-marijuana operators also responded to support Scott in the appeal, as they sought to protect investments in an industry where licenses have been involved in transactions worth more than $60 million.

But those efforts, and Scott’s appeal, elicited Redner’s contempt.

“I believe the statute is unconstitutional, and all this does is keep free enterprise from operating in the state of Florida. It helps give cartels and monopolies the marijuana business. It’s a calculated plan. I believe also that the reason the governor waited so long in order to appeal was that they were shaking down the present holders of licenses for campaign contributions,” Redner said in a telephone interview.

Florigrown CEO Adam Eland said he wasn’t surprised by Scott’s appeal, “but it infuriates me.”

“Our position has always been that Gov. Scott and the Legislature created a cartel here in Florida rather than a medical marijuana program for the patients. This is what a cartel looks like,” Eland told The News Service of Florida.

Dodson’s Oct. 5 ruling scolded state officials for treating the Constitution “like a recommendation” and gave the Department of Health two weeks to register Florigrown and to begin registering other medical-marijuana operators, or risk being found in contempt.

The Scott administration has faced harsh criticism, including from state legislators, for the rollout of the medical-marijuana industry during the past few years. Much of the blame has been placed on the Office of Medical Marijuana Use, a division of the health department.

The push for outside support for an appeal was viewed by many insiders as an attempt by Scott’s advisers to mitigate further criticism for what could be construed as yet another delay in carrying out the 2016 constitutional amendment. Health officials have been accused of a wide range of lapses, such as protracted delays in licensing marijuana operators and months-long waiting periods for eligible patients to receive ID cards required for access to treatment.

More than 71 percent of Florida voters approved the medical marijuana amendment in 2016, and polls have demonstrated widespread and bipartisan support for medical marijuana among all demographics throughout the state.

Florigrown is one of several companies that have gone to administrative or circuit courts to try to get licenses.

But if Dodson’s order is allowed to stand, it “will cause great uncertainty for Florida’s medical marijuana program and potentially undermine the industry’s ability to provide access to safe and effective medical marijuana to qualifying patients,” Ryan LaRocca, vice-president of current operator Surterra Therapeutics, wrote to Office of Medical Marijuana Use Director Courtney Coppola.

Similarly, Knox Medical CEO Jose Hidalgo warned health officials that Dodson’s order not only could have a negative impact on the quality of products available to patients, but could also result in an unregulated market that could “result in an oversupply of this unregulated medication that will clearly outpace the needs and demands of the qualified patients in Florida.”

Ben Pollara, the chairman of a political committee behind the 2016 constitutional amendment, acknowledged that allowing Dodson’s ruling to stand would have thrown the state’s medical marijuana industry — and the nearly 200,000 patients it serves — “into chaos.”

“Despite running for the cover of the Legislature before filing, there was never any real question Rick Scott would file this appeal,” Pollara said in a text.

But the appeal “doesn’t change the fact that the next governor is going to have to address Dodson’s valid concerns, and clean up the mess that the Scott administration has made of Florida’s medical marijuana system,” he added.