Last week, free speech suffered a blow when force and intimidation by some protesters prompted UC Berkeley to cancel a speech by Milo Yiannopoulos, who was invited to campus by the Berkeley College Republicans and who advocates racist, sexist and transphobic views. The cancellation should give no comfort to those who value equality and oppose these views; if anything, it likely gave Yiannopoulos and his abhorrent messages more attention than it would have if he had been allowed to speak.

The free speech protections of the federal and state constitutions embody the simple principle that more, not less, speech makes for a better democracy. They therefore protect not only Yiannopoulos’ right to give his speech, but also the right of people who oppose him to protest that speech, to urge others to boycott it and to point out how wrong it is. The commitment to free speech is nowhere more important than on our public university campuses, where the free exchange of ideas fosters knowledge, individual growth and tolerance for new and different ideas. The campus, in this case, took a courageous but unpopular stance by resisting calls to cancel the event.

Public universities also have a duty to make their campuses safe and inclusive for all students. This means that everyone — regardless of race, national origin, ethnicity, sex, religion, gender identity, sexual orientation and ability — should enjoy a campus free from harassment or intimidation. Campus administrators must strike the right balance in respecting free speech and ensuring equal educational opportunities. That balance is often difficult to achieve. But in the days before the event, the university did just that. In explaining the university’s decision not to cancel the event, Chancellor Dirks also rightly denounced Mr. Yiannopoulos as a “troll and provocateur” who engaged “in hate speech directed at a wide range of groups and individuals, as well as for disparaging and ridiculing individual audience members, particularly members of the LGBTQ community.”

This sent two important messages: that the University was standing up for the right of the Berkeley College Republicans to invite an unpopular speaker to campus, and that the University was condemning Mr. Yiannopoulos’ hateful ideas.

But that delicate balance was upset by the unlawful acts of some among the many peaceful protesters. The University’s ultimate cancellation of the event is by no means a victory for the values of inclusion and tolerance. It sets a dangerous precedent that those who bring the biggest rocks or wrenches can prevent unpopular speakers from being heard. Last week in Berkeley, it was Mr. Yiannopoulos. But he will go on delivering his hateful message, in person and in the media, and he and those who support him will use the cancellation to raise even more money and visibility. The rich and powerful will always be able to find other ways to get their messages out. But in another month, in another state, it may be a transgender activist, an advocate for police reform, or an outspoken opponent of the current administration, who is silenced by the mob, and has no other way to make her voice heard.

Alan Schlosser is senior counsel and Diana Tate Vermeire is the racial justice initiative director at the ACLU of Northern California, respectively. Contact the opinion desk at [email protected] or follow us on Twitter @dailycalopinion.