A federal judge on Tuesday ordered the Perkiomen Valley School District to reinstate its mask mandate, granting a temporary restraining order at the request of parents who said their disabled children were endangered by the district’s shift to optional masking a day earlier.

Following a hearing, Judge Wendy Beetlestone ordered the Montgomery County district to “immediately notify the entire school district by all means possible that universal masking is still required.” The order runs through Feb. 8.

The action came after the district dropped its mask mandate on Monday, instead “strongly recommending” masks. The district’s school board was among those in the area that moved to end mask requirements after the state Supreme Court struck down Gov. Tom Wolf’s mask mandate in December — voting 5-4 on Dec. 13 to make masking optional as of Jan. 3. It later moved the date to Monday.

Three sets of parents — who aren’t named in court records — sued the district and school board on Friday, arguing that abandoning the mask mandate had endangered their children and others with disabilities and violated the Americans with Disabilities Act.

“The board’s vote permitting optional masking forces the parents of medically fragile school children with disabilities to make the shockingly unfair or unjust decision of deciding whether to pull their children out of in-person learning, causing mental harm and havoc on the child and family, or face the quantifiably increased risk of physical harm caused by exposure to severe illness or death as a result of COVID-19,” the parents said in their complaint.

By “refusing to provide reasonable accommodations” to disabled students, the district “excludes Plaintiffs from access to school buildings and from their in-person education,” they said.

In a court filing, the district said that the risks alleged by the parents were too speculative to warrant a restraining order — that their children would contract COVID-19 at school “as opposed to elsewhere in the community,” that a mask mandate would prevent them from contracting the virus, and that an infection would be severe enough to result in hospitalization or death.

It also said it had provided accommodations for some students, including providing KF94/N95 masks, installing HEPA filters in classrooms, “placing the child in the vicinity of others who are wearing masks,” and using plastic glass in front of a student when near others without masks.

Beetlestone sided with plaintiffs, determining they “will likely suffer irreparable harm, including exposure to present and existential threats to health and safety, increased risk of serious bodily injury and/or death, and lost instructional time in the absence of a temporary restraining order.”

She set a deadline of Friday for plaintiffs to file a request for a preliminary injunction and scheduled a hearing for Feb. 4.

The school district did not immediately respond to a request for comment Tuesday night.