Amherst College students will be expected to leave campus by next Monday, the private liberal-arts college in Massachusetts announced Monday, as the school switches to online instruction in an attempt to slow the spread of coronavirus.

The announcement was a dramatic stroke from a small but nationally renowned school: A growing number of colleges and universities have announced temporary shifts to virtual classes in recent days in response to the uncertainty and rapid pace of changes with the covid-19 outbreak. Amherst took especially decisive action.

“We know that many people will travel widely during spring break, no matter how hard we try to discourage it,” the school’s president, Biddy Martin, wrote in a message to campus. “The risk of having hundreds of people return from their travels to the campus is too great. The best time to act in ways that slow the spread of the virus is now. Let me make our decisions clear.”

Classes will be canceled Thursday and Friday, she announced. Remote learning will begin after spring break March 23 so students can complete coursework off campus. The campus will remain open and faculty and staff will continue with normal schedules, but students are expected to leave within days.

Students may petition to remain on campus, Martin wrote, with a deadline of midnight Wednesday.

“It will be hard to give up, even temporarily, the close colloquy and individual attention that defines Amherst College,” Martin wrote. But the school acted in one another’s best interests: “Our goal is to keep members of our community as safe as we possibly can while ensuring that students can complete their coursework for the semester and the daily operations of the institution can continue.”

In recent days, many universities have upended academic traditions in an effort to protect health on campus in the face of an uncertain threat.

Classes at Princeton University will be held online and students are being encouraged to consider staying home after spring break, the school’s president announced Monday.

Some colleges closed temporarily to disinfect buildings and some moved rapidly to virtual instruction. Columbia University canceled classes Monday and Tuesday in preparation for a shift to online classes. Stanford University and the University of Washington announced a switch to virtual classes for the remainder of the winter quarter, and Rice University plans online-only classes this week.

Vanderbilt University in Nashville canceled classes for the rest of this week and plans to begin online instruction next Monday, continuing through the end of the month. But that might extend for the remainder of the spring semester if necessary, school officials announced Monday evening. The university remains open. All university events — outside of athletics — are suspended through the end of April, according to a message to campus from Susan R. Wente, interim chancellor and provost. The school also plans to restrict new visitors to campus, as some other schools have proposed.

New York University announced that online classes for its New York campus would begin Wednesday and continue after spring break at least through March 27, along with other restrictions on travel and gatherings on campus.

On Monday, Fordham University announced that, effective at 1 p.m., all face-to-face instruction was being suspended on its New York campuses, and students were encouraged to return home.

Students who cannot return home can stay in their dorms, the university’s president wrote in a message, and one dining hall will remain open on each campus. But on-campus events, including public Mass, were canceled at the Catholic university through at least March 29. The only exception is expected to be a limited number of intercollegiate athletic events, with only coaches and players allowed to be present.

Beginning Wednesday, classes will be taught online.

Falguni Sen, professor of strategy at the Gabelli School of Business and director of the Global Healthcare Innovation Management Center at Fordham, said students in one of his classes were panicking because they expected to take a midterm exam Monday.

He is feeling overwhelmed, Sen said, about swiftly changing his discussion-based classes into an online format. He said he wondered if the school’s response might be an overreaction but said because others are taking these steps, “I don’t blame our school for doing it as well."

He said he was concerned about students being advised to go home. “If they come from other cities, are we encouraging them to fly?” Sen asked, wondering if that might put them at greater risk of potential exposure to the virus. “I’m torn about this, he said.

“It’s a mess,” Sen said, “but I think it’s a mess not of our doing, but a mess that has happened to us, and all of us are doing our best to see that learning outcomes and the safety of students is maintained.”

In their announcement, Fordham officials said the measures “are in force until further notice. We will be communicating as far in advance as we can regarding significant events such as Commencement and Jubilee,” the statement noted, “but as of today we just don’t have enough information to make those decisions.”

The Navy Recruit Training Command, the boot camp for the U.S. Navy in Illinois, announced Monday it would suspend guest attendance at its planned graduation ceremonies, beginning Friday. The ceremonies, which happen nearly every week, will continue and be live-streamed, according to a public statement. About 700 recruits are expected to graduate this Friday, according to Lt. Kristina Wiedemann, a spokeswoman for the Navy Recruit Training Command.

The last graduation ceremony at which guest attendance was affected, Wiedemann wrote in an email, was Sept. 14, 2001 — three days after the terrorist attacks on New York and Washington.

Also on Monday, a group representing the nation’s college and university presidents abruptly scrapped an annual conference it was planning to hold for 1,500 higher education leaders starting next weekend in San Diego.

“Our first priority is the safety and well-being of our staff and attendees,” the American Council on Education said in a statement, noting that California, New York and Washington state have all declared states of emergency, and that coronavirus cases have been confirmed in more than half the states. “It seems inevitable that the news will get worse in this regard.”

At Princeton, the new policies intended to increase social distancing will be in place through April 5, according to university officials, and will be reassessed as that date approaches. The measures were adopted even though, so far, no one associated with the university has tested positive for covid-19.

“While much remains unknown about COVID-19’s epidemiology and impact, our medical advisers tell us that we should proceed on the assumption that the virus will spread more broadly and eventually reach our campus,” the university’s president, Christopher L. Eisgruber, wrote in a letter to campus Monday. “They also tell us that the best time to put in place policies to slow the spread of the virus is now, before we begin to see cases on our campus, rather than later.”

Acting now will also allow students to meet their academic requirements remotely, Eisgruber wrote.

“We encourage students to consider staying home after Spring Break,” Eisgruber wrote. Princeton will also limit the number and size of campus gatherings, and restrict university-sponsored travel, as multiple other universities have done in recent days.

Any lectures, seminars and precepts that can be taught virtually will be, he wrote, beginning March 23 when the school’s spring break has ended.

“Though we recognize that a personal, ‘high touch’ educational environment is one of Princeton’s great strengths,” Eisgruber wrote, “we also recognize that these are extraordinary times that require exceptional measures to deal with a health risk that affects us all.”

Eisgruber spoke to the difficult choices university leaders must make in the face of the rapidly evolving outbreak, acknowledging “that these measures impose significant restrictions and costs on projects that matter tremendously to each of us. …” People have different views about how to respond to the risks and uncertainties but, he wrote, “I ask all of you to join in supporting these policies, which address a threat affecting us all.”