Representative Elise Stefanik leaned into the microphone and volleyed a series of questions at the university president sitting in front of her. It was about three hours into a congressional hearing examining antisemitism at Columbia University, and the president, Nemat Shafik, paused, sighed and gave a nervous laugh.

Ms. Stefanik had asked whether the university would remove a professor who praised the Oct. 7 Hamas attack from a role as chair of the university’s academic review committee.

After a few seconds, Dr. Shafik responded. “I think that would be — I think, I would, yes. Let me come back with yes,” she said.

Republican lawmakers on the House Committee on Education and the Work Force had come ready to pounce. They tested for weaknesses and prodded vulnerabilities, while their witnesses, a group of Columbia leaders, seemed conciliatory.

And yet, by the end, it seemed Dr. Shafik and other campus leaders had successfully diffused Republican lines of attack, repeatedly and vigorously agreeing that antisemitism was a serious problem on their campus and vowing that they would do more to fight it.

But as Dr. Shafik spoke, the tempest that she had been brought in to account for appeared to intensify. Back on campus in Manhattan, pro-Palestinian students erected an encampment with dozens of tents on a central campus lawn, vowing not to move until Columbia divested from companies with ties to Israel and met other demands. Hundreds of other students joined them to rally throughout the day.