The U.S. Naval Academy moved nearly 200 midshipmen to hotels in downtown Annapolis this week following an uptick of coronavirus cases.

Officials said the students were moved off campus to create more quarantine and isolation space in Bancroft Hall, the academy’s dormitory complex. The announcement came after the academy enacted a “restriction of movement” order on Sunday, confining students to their rooms and shifting to virtual classes for at least 10 days, officials said.

“This is a dynamic situation and decisions are made on a daily basis in a way that prioritizes the health care needs of the midshipmen and well-being of our entire Naval Academy community,” Vice Adm. Sean Buck, the superintendent, said in a statement on Tuesday. “I am thankful for the flexibility and adaptability of the brigade and our entire team here on the yard and in the local community as we navigate this challenging period, especially the hotels for their responsiveness and hospitality.”

The academy did not say how many midshipmen have been sickened by the virus, citing Defense Department policy. But officials said it had moved 196 students to hotels — half to the Hilton Garden Inn and the rest to the Graduate Hotel.

“These midshipmen are recovering from the . . . virus and are from a variety of classes within the brigade,” Jenny Erickson, a spokeswoman for the academy, said in an email.

Officials have not tracked the spike in cases to a single source, but said they started to notice numbers rise around Feb. 18. Cases typically take between five and seven days after initial contact to manifest, suggesting students were exposed over Valentine’s Day weekend, Erickson said.

“While it might be satisfying to attribute this to just one variable, or one group, doing so would be an oversimplification,” Erickson said in an email. “That said, actions taken during liberty that weekend is most likely the primary issue leading to that rise.”

The academy did not say how many midshipmen who remain on the Annapolis campus are recovering from the virus.

The entire student body, called the brigade, has more than 4,500 midshipmen, federal education data show.

The midshipmen who were moved off campus this week will live in hotel rooms with a roommate, Erickson said. They will be required to stay in their rooms, except when escorted outside for two hours of physical activity.

To minimize contact with others, the students are not allowed to have guests or accept deliveries. The Naval Academy will serve meals directly to students during their stay off campus, officials said.

Sports practices and events have also been suspended, with exceptions being made for varsity women’s and men’s basketball.

Midshipmen fall under the second phase of the Maryland’s vaccination plan, and have yet to receive their doses, the Capital Gazette reported. Buck, appearing at a House Appropriations subcommittee meeting this week, told federal lawmakers he hopes to have midshipmen vaccinated “in the near future” so they can safely participate in summer training, which starts in May.