RICHMOND, Va. — A judge on Friday temporarily halted Republican Virginia Gov. Glenn Youngkin's executive order that sought to allow parents to opt out of classroom mask mandates for their children but had been met with resistance from some school districts.

Arlington Circuit Court Judge Louise DiMatteo ruled in favor of seven school boards that filed a lawsuit challenging the governor's order, one of the first actions Youngkin took after his inauguration Jan. 15. Her temporary restraining order means mask mandates put in place by school boards may remain, at least for now.

The judge found that the single issue before the court was whether Youngkin, through his emergency powers, can override the decision of local school boards delegated to them under a 2021 state law that required boards to provide in-person instruction in a way that adheres to federal COVID-19 mitigation strategies "to the maximum extent practicable." The Centers for Disease Control and Prevention recommends universal masking, regardless of vaccination status.

"On this pivotal point, the Court concludes that the Governor cannot" override local school officials, the judge wrote in her ruling.

DiMatteo said that while the case is pending in court, there appears to be a benefit to keeping the current polices of universal mask mandates in place.

"Keeping rules in place that have been established over the school year helps children, families and staff understand how they may be impacted during the pandemic. Without a restraining order, children and staff would have to reassess certain health conditions they believe are impacted by a mask policy (any mask policy), having relied upon a universal mask mandate implemented by the School Boards," DiMatteo wrote in her ruling.

A spokeswoman for Attorney General Jason Miyares said he will appeal the ruling.

Youngkin spokeswoman Macaulay Porter said in a statement that the decision was just the first step in the judicial process. "The governor will never stop fighting for parents' ability to choose what is best for their children," she said.

The school boards said in a joint statement that the judge's order protects "the health and well-being of all students and staff and reaffirms the constitutional right of Virginia's local school boards to enact policy at the local level."

The school boards that sued were: Alexandria, Arlington County, Fairfax County, Falls Church, Hampton, Prince William County and Richmond. They collectively serve over 350,000 students.

Youngkin, who campaigned heavily on education issues and had long said he opposed mask mandates, signed the order within hours of taking the oath of office. It took effect Jan. 24.

Districts across the state took various approaches to the governor's order, with many telling students masks were still required, despite the governor's order. Others dropped their mandates.

The Arlington lawsuit was one of several related to Youngkin's executive order but the first to go before a judge.

A group of Chesapeake parents challenged the order in front of the Virginia Supreme Court, and parents of children with disabilities have filed a federal lawsuit. Another case was filed in Loudoun County against the school board and in support of the governor's order.

Fairfax County Public Schools Board Chair Stella Pekarsky said in an interview that the uncertainty of the past couple of weeks have been difficult for families, the vast majority of whom opted to have their children follow the district's masking policy.

"We are hopeful this will be permanent," she said.

Copyright 2022 NPR. To see more, visit https://www.npr.org.