Schools in a cascading wave of states prepared to close next week, interrupting the education of millions of students amid growing fears of the coronavirus pandemic.

Even in places with scant evidence of the disease, governors were ordering shutdowns. That left school leaders scrambling to arrange online learning, meal distribution and accommodations for children with disabilities, with many systems writing plans on the fly.

On Friday, school leaders in the District of Columbia, Los Angeles and San Diego and governors in Pennsylvania, Illinois, Virginia, Wisconsin, Louisiana, Alabama, Utah and West Virginia joined five other states in closing their entire school systems.

“There is a downside to this, but it is the right thing in my mind to do,” West Virginia Gov. Jim Justice (R) said. At the time of his announcement, his state did not have a confirmed case of coronavirus, but he said: “We’ve got a monster that is looming.”

In New York City, the nation’s largest district with more than 1 million students, pressure built to close the schools, with calls for closure from the United Federation of Teachers and the speaker of the New York City Council, Corey Johnson, who said on Twitter: “It is not time to panic but it is time to act.” An online petition urging closure had more than 235,000 signatures.

Mayor Bill de Blasio (D) was resisting, saying he would do his “damnedest” to keep schools open.

“We have so many working New Yorkers who have no other place for their kids to be during the day,” he told CNN on Thursday. He noted that parents forced to stay home with their children include health-care professionals. “We can’t afford a situation where we start to lose all our public servants because they have to stay home because school is not in session.”

Teachers unions across the country have pushed for closures. Michael Mulgrew, president of United Federation of Teachers in New York, argued that moving students around the city every day was dangerous and that the best way to stop the spread of the virus is to close the schools. “Let’s close it down,” he said.

Closing schools is not advised in most cases under new guidance issued by the Centers for Disease Control and Prevention.

The document advises that a two-week school closure early in the spread of covid-19, the disease caused by coronavirus, is unlikely to stem it. Instead, it causes significant disruption for families, schools and those who may be responding to outbreaks in the health-care settings, and it may increase infection rates of older adults who care for grandchildren.

The CDC suggests officials consider closures only if there is “substantial” community transmission of disease. But the document was not released until Thursday afternoon, days after school officials began to announce closures.The document also assumes schools, in deciding how to respond, will know when someone infected has entered the school. But it is hard for them to determine that because testing is limited and children often show only mild symptoms.

Federal health officials were not openly critical of state actions, but one federal official, who spoke on the condition of anonymity to give a candid assessment, said: “It’s not necessary to take aggressive actions in areas where there isn’t spread of this virus or there’s not been sustained community spread.”

The guidance suggests alternatives for schools, such as staggering recess and canceling assemblies, to reduce times when large numbers of children would be together.

Nonetheless, Thursday and Friday brought a growing number of states and large school systems shutting down for two- and three-week breaks, with some saying they did not know when classes would resume.

There was confusion in Florida. Some districts reported that the state was ordering a shutdown, but a spokeswoman for the state said it was a strong recommendation. Even before that, leaders in two of the state’s largest counties — Miami-Dade and Palm Beach — had decided on their own to close.

Palm Beach County Superintendent Donald E. Fennoy II said his move was a first step to ensuring health and welfare of students and staff. “All of the other details will be worked out in a timely fashion,” he promised.

School systems were finding those details challenging, particularly serving children from low-income families who are less likely to have home computers and Internet connections and more likely to rely on schools for meals.

In Michigan, schools were set to close Monday, but the plan for engaging students in one rural district was still being devised Friday, said Becky Cranson, an English teacher at Bronson Community Schools in southern Michigan.

She said the district knows it cannot rely on virtual learning because many of the neediest students do not have Internet access. Instead, she is sending students home with directions to complete any missing assignments.

“There was not enough warning to plan anything more substantial,” she said.

The challenge was less daunting in affluent districts such as Upper Arlington City Schools, outside Columbus, Ohio. Superintendent Paul W. Imhoff said the district has only a handful of students who qualify for free lunches, and it is prepared to deliver them meals.

Every student is issued a computer already, he said. The vast majority of students have Internet access and the school is providing hot spots for those who don’t. For upper grades, teachers will record lessons and hold virtual office hours to answer questions using a video conferencing tool. Elementary grades will be provided a suite of activities with guidelines attached about how much time to spend reading and doing other work.

Imhoff said he felt ready but was still shocked by the unfolding events. “We’re all scrambling,” he said.

Too often, schools simply post worksheets online and call that distance learning, said Richard Culatta, chief executive of the International Society for Technology in Education, which advises schools on the matter. “It’s a horrible way to do learning,” he said.

With the cascade of school closings, his group is working to help districts devise systems that will take advantage of the opportunities for distance learning. For instance, he said, if students are studying geology, they might be asked to go find a particular type of rock outside and take a photo.

Another challenge for schools with low-income populations is delivering meals that students rely on when they are not in school. The Agriculture Department loosened some rules around the school lunch program, and Democrats in Congress are pushing for even more flexibility. But districts were left to find their own solutions.

In the Newark City Schools in Ohio, a majority of 6,700 students are from low-income families, said Superintendent Doug Ute. The district plans to keep one common area in each of its 12 school buildings open for part of each school day, probably the gymnasium. “We can control a single area and keep it clean after students leave each day,” he said.

Students who ordinarily eat breakfast and lunch at school can come and get it. In addition, school buses will go into the community to deliver food at specific spots, he said.

Another big worry is how schools will serve students with disabilities. This week, the U.S. Education Department issued guidance reminding districts of their responsibilities to serve these students, but experts said it will be a challenge.

“The biggest worry is that special education services, and related services like speech therapy and occupational therapy, will basically stop,” said Chris Yun, an education policy analyst for Access Living, a nonprofit in Chicago that advocates for and helps people with disabilities.

“The longer the closures are, I’m pretty sure that this big population of students will regress because they will not be receiving anything close to the work they could have been getting in school,” she said.

This mix of challenges has school districts and parents across the country trying to balance the tangible downsides of closure against the fears and unknowns of the coronavirus.

“There are no good options here. The risks are obvious if schools stay open. At the same time, so many families depend on our schools for food and child care during the day,” said Jenna Lempesis, a fourth-grade teacher in New York. “Many do not have the technology necessary for online learning. This virus has really laid bare the inequity among our nation’s schoolchildren: Who can afford to have schools closed and who can’t?”

Lena H. Sun contributed to this report.