The recent spread of the highly contagious Delta variant has thrown back-to-school plans into disarray, temporarily driving tens of thousands of students back to virtual learning or pausing instruction altogether.

Since the school year kicked off in late July, at least 1,000 schools across 31 states have closed because of Covid-19, according to Burbio, a Pelham, N.Y., data service that is monitoring school closures at 1,200 districts nationwide, including the 200 largest.

The shutdowns are hitting classrooms especially hard in the Deep South, where most schools were among the first to open, a possible warning of what’s to come as the rest of the nation’s students start school this month.

In Mississippi, 13,715 students have tested positive for Covid-19 since most schools inaugurated the new academic year in early August, sending more than 20,000 students into quarantine for each of the past three weeks, as of Aug. 31, according to the state health department. In New Mexico, nearly 10% of the state’s 317,000 students have spent time in quarantine, state data show. And in Georgia, more than half of the state’s outbreaks for the week ended Aug. 27 were linked to schools, according to the state health department.

The first day of school for Hillsborough County, Fla., students was Aug. 10. The county school board voted Aug. 18 to implement a 30-day mask mandate.

Photo: Martha Asencio-Rhine/Zuma Press

Many school systems are reluctant to release contingency plans and are instead forging ahead with solutions that, when possible, keep classrooms open amid outbreaks, mass quarantines and acute staff shortages. School administrators are responding to the sporadic and unpredictable outbreaks with measures like new masking mandates, frequent testing and vaccine mandates for employees. Some say they hope a vaccine for children under 12 happens soon.

“We’re not scared of the future necessarily,” said Cristen Maddux, the spokeswoman for Indian River County School District in Florida, which has temporarily shut two elementary schools. “The closures have gone very smoothly, and we’re just going to take it one day at a time.”

It is difficult to assess precisely how badly schools have been hit by the virus, partly because of variations in data reporting.

SHARE YOUR THOUGHTS

How has Covid-19 affected schools near you this year? Join the conversation below.

But according to an analysis of the available data from state health departments, the number of infections in school-age children has climbed more rapidly in states where students have been back in school for weeks.

Average daily new cases among school-age children grew at faster rates last month in all 20 states where schools opened in late July and early August, as compared with the states where schools opened later. Half of those states, which include Georgia, Indiana, South Carolina and Louisiana, have seen record rates of new daily infections among children and teens since school started, according to data from the COVKID Project, a program of the Women’s Institute for Independent Social inquiry that has been tracking and compiling U.S. Covid-19 infection data in children and teens from state public health departments.

A study released by the CDC last week illustrates how easily the Delta variant can rip through a school when safety protocols like masking aren’t followed: At a California elementary school, an unvaccinated, unmasked and infected teacher spread the virus to more than half of the students in the teacher’s immediate classroom in late May. The teacher also infected six students in a separate grade, and another four parents and four siblings of students. In all, contact with one infected teacher led to 26 more cases in the school community.

Students leave Hollywood High School in Los Angeles on Aug. 16.

Photo: Bing Guan/Bloomberg News

The CDC recommends the use of masks indoors for all students and staff, regardless of vaccination status.

In Florida, which is experiencing its third surge since the pandemic began and where some schools have been battling Republican Gov. Ron DeSantis’s ban on mask mandates, the average daily rate at which people age 19 and younger tested positive was the highest in the country for the week ended Aug. 27, according to the COVKID Project. Tennessee, where schools opened in early August and mask mandates are banned in schools, recorded the second-highest rate of average daily kid cases nationwide for the same week.

The increase in cases among younger people is keeping thousands of Florida students and staff at home. Hillsborough County Public Schools, which encompasses Tampa, has logged over 7,300 positive cases since Aug. 2, forcing almost 4% of students and staff to either isolate or quarantine due to exposure as of Friday, according to the district’s dashboard. The county school board voted Aug. 18 to implement a 30-day mask mandate with more limited opt-out options for students in response to the growing number of cases.

Indian River County School District, located about two hours north of Boca Raton and which serves 15,500 public school students, suffered significant blows since reopening last month. Two teachers who had Covid-19 died within about a week of one another. Around the same time, a shortage of teachers due to high staff-infection rates temporarily closed two elementary schools, a district spokeswoman said. On Aug. 24, the board voted to require masks for a two-week trial period.

Rising infections have led at least two-dozen districts in Texas to temporarily close some or all schools, according to Burbio. The number of positive student cases reported on campuses statewide totaled 27,353 for the week ended Aug. 29, up 51% from the previous week, according to the state department of health services.

Iowa, Tennessee, South Carolina and Utah have banned or curtailed school mask requirements. Five other states—Oklahoma, Florida, Texas, Arkansas and Arizona—had prohibited school-masking requirements as well but they have since been overturned by the courts or aren’t being enforced.

Aaron Baker, who was fully vaccinated in March, felt a cough coming on behind his cloth mask as he was teaching his 12th grade government class in Oklahoma’s Putnam City Schools on Aug. 20, the first time he had taught a full week of in-person classes since the pandemic began. He tested positive for Covid-19 that day.

“That’s all it took—five days,” Mr. Baker said. The 44-year-old teacher said a third of his students had been donning masks in his classroom. When Mr. Baker returned to school last Tuesday, the school was scrambling for staff and half of his students were out due to infection or exposure.

The Delta variant has inundated some schools even in states and districts that have had strict masking policies in place. In New Mexico, where masks are required in school buildings, school transportation and school-sponsored events, 1,908 students tested positive in August—more than all the positive student cases combined in 2021 so far.

One way to minimize mass closures and quarantines is the “test and stay” protocol deployed in Massachusetts in which asymptomatic people exposed to a confirmed case take rapid tests daily to monitor for infection rather than be automatically confined to their homes, said Elizabeth Stuart, the associate dean for education at the Johns Hopkins Bloomberg School of Public Health.

“I think that’s the kind of creative and technological solution that we’re going to need,” said Dr. Stuart, “because that balances the Covid risk with the desire to keep kids in in-person learning.”

Write to Yoree Koh at yoree.koh@wsj.com