SAN FRANCISCO — Twitter CEO Dick Costolo revealed that he and his staff have received death threats from ISIS.

The terrorist organization had been using Twitter to communicate news, and Costolo said that when Twitter found out about it, the company would regularly shut down the ISIS accounts.

“After we started suspending their accounts, some folks affiliated with the organization used Twitter to declare that employees of Twitter and their management should be assassinated. Obviously that’s a jarring thing for anyone to deal with,” he told Aspen Institute president Walter Isaacson during the Vanity Fair New Establishment Summit.

Earlier in the session, Isaacson pointed out that ISIS had been using the social media network to get its message out. It had used Twitter to point out its video of a beheading of American journalist James Foley on YouTube. Costolo discussed the challenge of balancing the ability to be a free and open platform against wider concerns and government intervention.

After we started suspending their accounts, some folks affiliated with the organization used Twitter to declare that employees of Twitter and their management should be assassinated. - Twitter CEO Dick Costolo

“Whenever you have a global public information-sharing channel, you are going to have people that use it for good. It’s obviously been a tool for social change, beneficial social change in a number of countries around the world,” Costolo said.

And then there are people who are going to use it for nefarious purposes. “It’s against our terms of service. It’s against the law in many of the countries in which we operate for them to use it to promote their organization. And when we do find those accounts, we shut them down. We shut them down quite actively,” he said.

Prior to the initial public stock offering, he said, “I was always asked how are you going to balance the needs of your business against the rights of your users and the desire to promote open speech. The reality is almost never about a debate between the needs of the business and the needs of one group of users. It is almost always a debate [with] two different perspectives about a piece of speech,” the Twitter chief said.

Highlighting the delicate balancing act, on Tuesday, Twitter also filed a freedom-of-speech lawsuit against the Justice Department, the FBI and the NSA, claiming that the government’s restrictions on what the company can reveal publicly about the government’s national security requests for user data violate the microblogger’s First Amendment rights.