Virginia will require all students, teachers and staff in K-12 schools to wear masks indoors this fall, even if they are vaccinated, Gov. Ralph Northam (D) announced Thursday.

Many school systems across the state and in the D.C. area have already announced mask mandates. But the statewide mandate, set forth in a public health emergency order, is sure to stir controversy and anger amid an already fractious debate over education in Virginia.

It also represents an escalation from the state’s previous guidance on the issue. On July 21, Virginia officials strongly recommended that masks be worn by everyone inside elementary schools and by anyone not fully vaccinated in middle and high schools, citing federal health guidelines. At the time, state officials said their suggestion was not binding and that decisions about masks would be left to local school districts.

Then on July 27, the Centers for Disease Control and Prevention recommended that everyone older than 2, including vaccinated people, wear masks inside school buildings, in part pointing to the rapid rise of the delta variant of the coronavirus. Northam has previously noted that a bill passed by state lawmakers this year requires schools to follow CDC guidance “to the maximum extent practicable.”

Republican lawmakers have criticized the governor for what they see as his shifting stance on masks. But Northam has insisted that officials are just trying to stay consistent with the latest CDC recommendations.

“We all share the same goal of keeping our schools open and keeping our students safe,” Northam said a statement Thursday. “The Public Health Order makes it very clear that masks are required in all indoor K-12 settings, and Virginia expects all schools to comply.”

But the order was immediately denounced by prominent Republicans, including House Minority Leader Todd Gilbert (Shenandoah) and Glenn Youngkin, the party’s nominee for governor.

Youngkin said in a statement that Northam is taking away “parents’ ability to decide what’s best for our kids,” and he warned that the mask mandate marks “the first step towards returning to a full shutdown of our economy.”

Most students in Virginia — and across the nation — are slated to return to classrooms for in-person learning this month after more than a year of remote instruction for some. Educators and experts agree that face-to-face instruction is crucial to catch up students who have struggled academically and socially during the pandemic.

But there is no such consensus around mask-wearing inside schools, which has developed into a fraught national debate with political overtones. Pediatricians and epidemiologists are insisting that masks represent one of the most effective ways to stop transmission of the virus in schools — and are pointing to the spread of the delta variant, a highly contagious strain of the virus that may be more likely to cause serious illness.

The delta variant is especially concerning in school settings given that there is no vaccine available for children younger than 12, meaning many schoolchildren will start the academic year unvaccinated. The CDC’s late-July guidance on masks was in part a response to burgeoning fear of the delta variant.

And there is some public support for masking in schools: A poll released this week by the Kaiser Family Foundation found that 63 percent of parents of school-age children said their school should require that masks be worn by unvaccinated students and staff.

Nonetheless, several Republican-led states have forbidden school districts from requiring masks. In Florida, Gov. Ron DeSantis has threatened to withhold the pay of school officials who impose a mask mandate. And at school board meetings nationwide, angry parents are speaking up to condemn mask-wearing, and in some places they are threatening to pull their children from public school if mandates are imposed.

The mask battle has been fierce in politically split Virginia, which was long a Republican stronghold but has turned purple in the past decades — and is now veering toward blue. Just this week, the school board in rural, Republican-leaning Fauquier County voted to make masks optional this fall, after a lengthy meeting that saw impassioned speeches from parents and which a local news outlet described as “raucous.” Fauquier schools spokeswoman Tara Helkwoski said Thursday that the school board plans to hold a work session on Friday afternoon to discuss how to respond to the governor’s mask mandate.

Still, some teachers’ groups applauded the governor’s actions. The Virginia Education Association, which represents more than 40,000 members statewide, called the mask mandate a “common-sense precaution that will save lives.”

Elsewhere in the Washington region, though, Northam’s order drew not a murmur. The school systems in D.C. and in two of Maryland’s largest counties, Prince George’s and Montgomery, adopted mask mandates last month.

Several school systems in suburban, largely liberal Northern Virginia had also opted to require masks this fall by the time of Northam’s order.

The school systems in Arlington and Fairfax County announced their mask mandates last month, not long after the CDC recommended mandating face coverings in schools. Both are requiring that students and employees wear masks indoors and on buses. Arlington officials said Thursday that the county will also require that public school teachers and government employees either get vaccinated or undergo weekly testing for the virus.

The systems in Loudoun County and Alexandria City passed mask mandates this month. Alexandria’s school system has promised to purchase five reusable face coverings for every student and staff member.

In Loudoun, officials announced a mask requirement on Aug. 2, writing in a message to families that everyone, regardless of vaccination status, would have to use a face covering indoors. Loudoun, like Alexandria, is providing masks to students and staff members who lack them.

“We realize that our desire for in-person learning is currently being challenged by rising community risk in Loudoun County and the potential impact of the Delta variant,” Superintendent Scott A. Ziegler said in a statement. “Mask-wearing will minimize the need for quarantining, helping us keep students in the classroom.”

But the announcement in Loudoun got immediate pushback. At a school board meeting this week, dozens of parents showed up to voice their displeasure with the mask mandate during a public comment session that stretched for more than four hours, as many shared their concerns with the reopening plan and other topics.

These parents — and others in Virginia upset about masks — may be fighting a losing battle. Since the governor issued his guidance last week suggesting that school systems require masks, “the vast majority [of school systems statewide] have chosen to follow it,” Northam spokeswoman Alena Yarmosky said.

There are only “a handful” of school divisions that are still not requiring masks, Yarmosky said, although she did not provide specific numbers.

Thursday’s mandate represents an attempt to reach those holdout school districts by “the governor and the health commissioner being as clear as possible,” she said.

“This is just making it extra clear,” Yarmosky said, “for those who may still be needing some additional clarity from us.”

Gregory S. Schneider contributed to this report.