The spread of the coronavirus accelerated sharply in U.S. counties where large universities held classes in person last fall, federal health researchers reported on Wednesday.

Incidence rates in those counties rose more than 50 percent in the first three weeks after classes started, compared with the previous three-week period, according to a new study by the Centers for Disease Control and Prevention. By contrast, infection rates declined in counties without large universities or where large universities held classes remotely last fall, the study said.

The findings come as many students who were home for the holidays prepare to return to campus. They will converge on college towns at a time when the virus is surging in many parts of the country, overwhelming hospitals and straining health care services.

At least 3,964 new coronavirus deaths and 255,728 new cases were reported in the United States on Wednesday, according to a New York Times database.

C.D.C. researchers focused on 101 counties with nonprofit universities that enroll 20,000 students or more and where classes started between July 27 and Aug. 28. The researchers defined remote learning as instruction that appeared to minimize in-person class work on campus; the definition allowed for some in-person instruction for lab and studio courses or for small groups with specific needs.

The incidence of new coronavirus cases was generally declining in early August, the researchers said, though rates among adults aged 18 to 22 were on the rise. Infection rates went on falling — by an average of 18 percent — where large universities chose to teach remotely, the researchers found, but the rates shot up where in-person instruction was underway.

The researchers did not take account of whether students were physically present on campus, even if classes were being held remotely, Dr. Lisa Barrios, a member of the C.D.C.’s Covid-19 response team, pointed out. As a result, she said, it was hard to know whether the large decreases in remote-learning counties happened because fewer students were physically present, or because the universities did other things as well, like impose rigorous mask mandates and bans on social gatherings.

The study also compared counties with large universities teaching in person against counties less than 500 miles away with about the same total population but no large university, and found similarly sharp differences in virus incidence: an 80 percent rise in the university counties, versus a drop of nearly 20 percent in the others.

Dr. Barrios urged universities to increase testing when students return to campus and make adequate provisions to isolate and quarantine infected and exposed students. Students and staff members who catch the virus may increase the risks to people off campus, particularly those who are older or have underlying health problems.

“Most universities don’t exist in a bubble,” Dr. Barrios said. “They are integral parts of their communities.”