Columbia University's main campus will switch to hybrid learning — giving students the option to attend classes online rather than in person — for the rest of the semester amid protests over Israel's war with Hamas that have roiled colleges across the U.S.

"Safety is our highest priority as we strive to support our students' learning and all the required academic operations," the Ivy League university's provost, Angela V. Olinto, and chief operating officer, Cas Holloway, said in a statement late Monday.

Some students have said they are afraid to set foot on Columbia's campus with tensions running high.

The move comes as schools across the country, many of which have about two weeks of classes left before the semester ends, grapple with how to handle similar protests. Since the war began, colleges and universities have struggled to balance safety with free speech rights. Many long tolerated protests but are now doling out more heavy-handed discipline.

Tensions have risen since more than 100 pro-Palestinian demonstrators who had camped out on Columbia's upper Manhattan campus were arrested last week.

The arrests sparked renewed anti-war protests and encampments, including at New York University a few miles south of Columbia, where an encampment swelled to hundreds of protesters and police began to make arrests Monday night.

A police spokesperson said he did not know how many NYU protesters had been arrested. University spokesperson John Beckman said NYU was carrying on with classes Tuesday.

The protests have pitted students against one another, with pro-Palestinian students demanding that their schools condemn Israel's assault on Gaza and divest from companies that sell weapons to Israel. Some Jewish students, meanwhile, say much of the criticism of Israel has veered into antisemitism.

Columbia University President Minouche Shafik said in a message to the school community Monday that she was "deeply saddened" by what was happening on the campus.

"To deescalate the rancor and give us all a chance to consider next steps, I am announcing that all classes will be held virtually on Monday," Shafik wrote, noting that students who didn't live on campus should stay away.

Robert Kraft, who owns the New England Patriots football team and funded the Kraft Center for Jewish Student Life across from Columbia's campus, said he was suspending donations to the university.

"I am no longer confident that Columbia can protect its students and staff and I am not comfortable supporting the university until corrective action is taken," he said in a statement.

Campus protests began after Hamas' deadly attack on southern Israel, when militants killed about 1,200 people, most of them civilians, and took roughly 250 hostages. During the ensuing war, Israel has killed more than 34,000 Palestinians in the Gaza Strip, according to the local health ministry, which doesn't distinguish between combatants and noncombatants but says at least two-thirds of the dead are children and women.