A Florida judge dealt Gov. Ron DeSantis a stinging defeat Friday by throwing out his order that banned local school districts from requiring children wear masks.

The governor had previously warned school officials to think twice about defying or ignoring his executive order after 10 districts refused to abide by it, including Miami-Dade County.

Judge John Cooper ruled on a lawsuit brought by parents who say DeSantis overstepped his authority by preventing school districts from enforcing any mask mandates. The lawsuit claims DeSantis' administration was placing the health of their children in danger at a time when COVID-19 cases are surging across Florida.

DeSantis’ argument has been that parents should have the final say over what was best for their children. Like resistance to vaccine mandates across the country, anti-mask sentiment has become a divisive political issue between Republican politicians who frame the issues as matters of personal freedom and opponents who say his positions undermine public health.

“We don’t have that right because exercising the right in that way is harmful or potentially harmful to other people,” Cooper said in his ruling, dismissing the executive order as being "without legal authority".

"We will not solve any issue if we can't sit down and work together and take positions recognizing what's going on is not some recent imposition or some attack on the country," Cooper continued.

After Cooper issued his decision, Senate Democratic Leader Lauren Book praised the ruling and the parents who brought it to the court. She dismissed DeSantis’ ban as a “power grab”.

“As the Senate Democratic Caucus has maintained, and Judge Cooper ruled today, the Governor overstepped his constitutional authority by ordering a blanket statewide mask ban. This politically driven power grab put the health and safety of millions of Florida’s children, their families, and their communities at risk,” Book said in a press statement after the ruling.

DeSantis’ office has yet to respond to this rebuke, but Florida’s Agriculture Commissioner Nikki Fried, who is running to defeat DeSantis next year in gubernatorial election, applauded the court's decision. She called it a "win for common sense, for children's safety, and for all the families and school officials" who have rejected DeSantis' decision.

After issuing his order forbidding masks in school, DeSantis threatened to withhold salaries from teachers in the 10 districts that were refusing to follow the order. His administration and its allies later threatened to remove the school officials who were in non-compliance.