It looked like any other pro-Palestinian encampment at a college campus in the United States. The tents, the flags, the banners calling for a cease-fire in the Israel-Hamas war.

But this was at the University of California, San Francisco, one of the nation’s pre-eminent medical schools and teaching hospitals. The protesters were medical students and doctors. And the chants of “intifada, intifada, long live intifada!” could be heard by patients in their hospital rooms at the U.C.S.F. Medical Center.

The Israel-Hamas war has frayed social ties around the world, undermining family gatherings and school classrooms. But rarely has it fractured a medical community the way it has at U.C.S.F., where a staff known for celebrating diversity has fallen into an atmosphere of backbiting and distrust.

The university and the medical center are uniquely intertwined, both overseen by the same administration and thought of locally as one premier institution. Unlike other University of California campuses, U.C.S.F. does not have undergraduates and focuses only on health sciences. And for decades, it has built a national reputation for caring for a broad array of patients in the city, from those addicted to fentanyl on the streets to tech billionaires seeking world-class services.

But many say the spirit of camaraderie and inclusion has dissipated since the Oct. 7 Hamas-led attack against Israel. Doctors there have feuded over whether it is appropriate to openly express feelings about the war within the healing confines of a hospital. In interviews, several Jewish doctors said they had taken an oath to “do no harm,” and that meant keeping politics separate from the care of their patients.

But some doctors said they interpreted “do no harm” in a different way, feeling a moral obligation to speak out against the killing of doctors and patients in Gaza where Israeli strikes have struck hospitals. And they said that as a medical community, it was important for U.C.S.F. to take a stand against the war and call for a cease-fire.