The U.S. government should not consider shutting down parts of the Web as it continues to develop ways to prevent the Internet from being used for terrorist purposes, a top State Department official said Thursday. The remarks — from the State Department’s Legal Adviser Brian Egan — offer a clear rebuttal to a proposal Donald Trump made while running for president.

“We’re losing a lot of people because of the internet,” Trump said in December. “We have to see Bill Gates and a lot of different people that really understand what’s happening. We have to talk to them about, maybe in certain areas, closing that internet up in some ways. Somebody will say, ‘Oh freedom of speech, freedom of speech.’ These are foolish people.”

Speaking Thursday at Berkeley Law School, Egan refuted this idea. He referred to “calls to restrict public access to or censor the Internet, or even—as some have suggested—to effectively shut down entire portions of the Web.” Egan said,  “restricting the flow of ideas also inhibits spreading the values of understanding and mutual respect that offer one of the most powerful antidotes to the hateful and violent narratives propagated by terrorist groups.”

Importantly, Egan also put a finer point on how certain actions violate international law. He said: “certain censorship and content control, including blocking websites simply because they contain content that criticizes a leader, a government policy, or an ideology, or because the content espouses particular religious beliefs, violates international human rights law and must not be engaged in by States.”

Here’s the full quote:

“There is no doubt that terrorist groups have become dangerously adept at using the Internet and other communications technologies to propagate their hateful messages, recruit adherents, and urge followers to commit violent acts. This is why all governments must work together to target online criminal activities—such as illicit money transfers, terrorist attack planning and coordination, criminal solicitation, and the provision of material support to terrorist groups. U.S. efforts to prevent the Internet from being used for terrorist purposes also focus on criminal activities that facilitate terrorism, such as financing and recruitment, not on restricting expressive content, even if that content is repugnant or inimical to our core values.

Such efforts must not be conflated with broader calls to restrict public access to or censor the Internet, or even—as some have suggested—to effectively shut down entire portions of the Web. Such measures would not advance our security, and they would be inconsistent with our values. The Internet must remain open to the free flow of information and ideas. Restricting the flow of ideas also inhibits spreading the values of understanding and mutual respect that offer one of the most powerful antidotes to the hateful and violent narratives propagated by terrorist groups.

That is why the United States holds the view that use of the Internet, including social media, in furtherance of terrorism and other criminal activity must be addressed through lawful means that respect each State’s international obligations and commitments regarding human rights, including the freedom of expression, and that serve the objectives of the free flow of information and a free and open Internet. To be sure, the incitement of imminent terrorist violence may be restricted. However, certain censorship and content control, including blocking websites simply because they contain content that criticizes a leader, a government policy, or an ideology, or because the content espouses particular religious beliefs, violates international human rights law and must not be engaged in by States.”

The speech was also an important statement on several issues involving the U.S. position on international law and cyberspace, including the role of non-governmental organizations and efforts such as the upcoming release of the Tallinn 2.0 Manual.

Read the full speech here.

Watch this space:  Coming soon Just Security’s Mike Schmitt will be writing a post taking a closer look at Egan’s speech.