Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Twitter Inc won a bid to dismiss a lawsuit brought by the widow of an American killed in Jordan which accused the social media company of giving voice to ISIS, a federal judge ruled on Wednesday.

U.S. District Judge William H. Orrick in San Francisco ruled that Twitter cannot be held liable for ISIS rhetoric, but gave the plaintiff a chance to refile an amended lawsuit.

Social media companies including Twitter have faced pressure to crack down on online propaganda linked to terrorism.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Tamara Fields, a Florida woman whose husband Lloyd died in an attack on the police training center in Amman last year, said Twitter knowingly let the militant Islamist group use its network to spread propaganda, raise money and attract recruits.

While Orrick called the deaths "horrific," he agreed with Twitter and said federal law protects the company from liability for the content that third parties publish on its platform.

Attorneys for Fields and a Twitter representative could not immediately be reached for comment.

In her complaint filed earlier this year, Fields said San Francisco-based Twitter had until recently given ISIS an "unfettered" ability to maintain official Twitter accounts.

"Without Twitter, the explosive growth of ISIS over the last few years into the most-feared terrorist group in the world would not have been possible," the lawsuit said.

Twitter had previously said the lawsuit was without merit, but that "violent threats and the promotion of terrorism deserve no place on Twitter and, like other social networks, our rules make that clear."