It was a relief to learn of the arrest last week of a 21-year-old Cornell University student for threatening to rape and murder Jews on campus in reaction to the Israel-Hamas war. It was also an easy case: Violent threats against specific people are illegal, and they are dealt with by the justice system, not school administrators.

Easy cases are hard to come by these days, especially at colleges and universities, where the divisions over the Middle East conflict are starker than in any other sector of American society. Examples abound of abhorrent speech by students and faculty members, mostly aimed at Israel, Jews and even Jewish students — and yet abhorrent does not equal criminal. How should a university respond when members of its community express sentiments that are at odds with the values the school is trying to inculcate, not to mention with human decency?

There are answers, and they won’t make everyone happy. They start with a core value that too often gets lost in the heat of these debates: Speech should be presumptively allowed, as a basic principle of free inquiry and academic debate. The details of achieving that may get messy fast, but the goal is fundamental on campuses. While schools have faced challenges like these before, more recent developments in campus politics and civility can help ensure that colleges don’t lose their way or make themselves vulnerable to partisan attacks and regulations.

Unfortunately, the universities themselves have done their part to add to the mess. By taking public positions on some high-profile political issues but not others in recent years, they have exposed themselves to charges of inconsistency and bias. By imposing speech codes that ban what they deem offensive speech without clearly defining it, they have encouraged illiberalism in an environment designed to cultivate the liberal arts. And by relying increasingly on an ever-shrinking number of ultrawealthy donors, they have put themselves at risk of losing huge amounts of money if the donors decide they don’t like what is being said (or not said) in the university’s name.

As a result, many schools have flailed, some more than once, in their attempts to navigate the storms of speech, activism and vitriol that have consumed their communities over the past month. Administrators continue to face intense pressure to make statements and take sides, whether from students, faculty members, donors or lawmakers.

One solution is to say nothing or as little as possible. This is known as the University of Chicago approach, after that school issued a report in 1967 urging neutrality in response to student protests against the Vietnam War.

“The neutrality of the university as an institution arises then not from a lack of courage nor out of indifference and insensitivity,” the university said in the report, named after its principal author, Harry Kalven Jr. “It arises out of respect for free inquiry and the obligation to cherish a diversity of viewpoints.”

That’s easier said than done, as the report admitted. Universities are not sealed off from the wider culture, nor should they be. Still, every institutional foray into politics comes with risks.

“There’s no answer that will please everybody,” Erwin Chemerinsky, the dean of the Berkeley School of Law and an expert on free speech, told me. “I put out a statement, the first sentence of which said I’m horrified by the terrorism that occurred in Israel. I got called a racist for that statement, because it labels it as terrorism.” He pointed out, however, that silence can speak just as loudly. “I didn’t issue any statement condemning students who defended Hamas. I got criticized for that.”

Mr. Chemerinsky wasn’t complaining about the criticism — he’s heard far worse — but even he was shocked by the degree of antisemitism he has been seeing on campus in recent weeks, much of it without meaningful pushback from university administrators.

At public universities like Berkeley, the First Amendment provides broad speech protections. At private universities, that permissiveness is not constitutionally required, but it is (or should be) part of the academic culture. All schools are obligated to follow Title VI of the Civil Rights Act, which bars discrimination based on race, color or national origin. The trick is in balancing a commitment to open, uninhibited debate with ensuring that students do not fear for their physical safety from those who disagree with them.

That’s why a university’s primary role should be to create a haven — a safe space — for open debate that emphasizes listening and mutual respect, if not agreement. “To be open to both all people and all ideas,” as Suzanne Nossel, who leads PEN America, put it. “The imperative is to make room for vigorous debate, airing ideas that are offensive or make people uncomfortable. That’s imperative in a moment like this. The answer can’t be to shut down that debate.”

True, and yet Jewish students can be forgiven for wondering why they must endure their professors referring to a terrorist slaughter of Jews as exhilarating and their fellow students calling to get rid of the Zionists. In an age of heightened sensitivity to the real harm that speech can inflict, it seems Jewish students are expected to take it on the chin.

The bottom line is that universities undermine their basic purpose if their students feel in physical danger. Administrators can and should speak out in defense of the safety of their students and the values of their academic community, even if doing so means weighing in on a larger political debate.

As colleges and universities have been discovering, a culture of basic respect and listening doesn’t appear magically. It is unreasonable to expect that students barely out of high school, not yet fully grown in body or mind, should just know how free-speech culture works, even as they are entering what for many of them is the most pluralistic environment they’ve ever encountered. “It’s work!” Ms. Nossel said. “It’s the work of democratic citizenry, how we live together and make space for one another’s ideas.”

That’s why it’s important to make it a mandatory part of first-year education, at the least, akin to the way students are trained to spot and prevent sexual harassment and assault.

The point isn’t to engender some vague idea of civility but rather to instill the importance of building a pluralistic society.

Obviously there are legal red lines to a culture of free speech: threats, intimidation and harassment, to name the obvious ones. But universities can add their own limits — for instance, no targeting of specific students or of groups because of identity.

The rules and limits are likely to be different based on regions and varying campus cultures, but they should err toward permissiveness, and they should be clear and consistent and be communicated in advance. That will give students the opportunity to learn while at school and to consider the ramifications of their speech not just in the school environment but also in their lives after graduation. (The recent warning by a group of top law firms that they will not tolerate a history of antisemitic or anti-Islamic behavior from applicants for jobs should stand as a reminder to students of the real-world consequences of their campus behavior.)

Schools must also make it clear to donors that their contributions cannot have political strings attached. Two recent cases in which donors or lawmakers objected to the hiring of Black journalists as tenured faculty members — one at the University of North Carolina and the other at Texas A&M — illustrate how corrupting it is to a university’s core mission when outsiders with money or power control academic decisions.

Finally, lawmakers who control the budgets and agendas of state universities need to respect the same educational goals that academic leaders do, especially because these institutions educate far more students than elite private schools do. This year, to cite one prominent example, Gov. Ron DeSantis of Florida signed three bills that restrict certain topics from being taught — including theories of racial history — and prohibit campuswide diversity statements. Several Republican members of Congress have introduced a misguided bill in the House to cut funding for colleges that allow what is loosely defined as antisemitic speech on campus, including claims that Jews are more loyal to Israel than their own nations.

Lawmakers — no less than donors, administrators, educators and students — have a role to play in fostering the sort of culture that universities are uniquely suited to embody, and that is a building block in the maintenance of a free, pluralistic society.