A federal judge has sided with parents of disabled children, issuing a ruling that temporarily overturns an Iowa law that had prohibited schools from requiring masks during the pandemic.

In a ruling on Monday, US District Judge Robert Pratt wrote that he agreed with parents that the state law “substantially increases” the risk of children contracting COVID-19.

In May, Iowa’s Republican-led legislature passed a measure that barred schools from mandating that either students or staff wear face coverings, billing it as a victory for freedom and parents’ rights.

But in a lawsuit filed earlier this month, parents of disabled children argued that the prohibition effectively denied immunocompromised students their right to an education.

Judge Pratt found that argument persuasive, writing that he had reviewed the data himself and found it “overwhelmingly supports” the recommendations of the American Academy of Pediatrics and the US Centers for Disease Control Prevention, both of which advise that masking not be made optional.

“The data further shows it is important for all students, staff, and teachers to wear masks to reduce the spread, not merely those who are most vulnerable to severe illness and death,” he wrote.

Monday’s ruling is a temporary restraining order that will remain in effect until the judge rules on plaintiffs’ request for a preliminary injunction. For now, it means local school districts can move forward with mandates.

“The court is making it clear that students with disabilities have the right to go to school safely during this pandemic,” Shira Wakschlag, senior director of legal advocacy at The Arc, a disability rights group that filed the lawsuit, said in a statement to Insider.

Catherine E. Johnson, executive director of Disability Rights Iowa, likewise praised Monday’s decision, saying Iowans would no longer need to choose between their child’s health or their ecucation.

“Effective today, parents no longer have to make this impossible choice, their children are entitled to both,” she said in a statement.

Although the order suggests that the court believes plaintiffs will ultimately prevail, Iowa Gov. Kim Reynolds, a Republican, said she would keep fighting.

“We will appeal and exercise every legal option we have to uphold state law and the defend the rights and liberties afforded to any American citizen protected by our constitution,” Reynolds said in a statement.