Twitter 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 Islamic State, a federal judge ruled on Wednesday.
U.S. District Judge William H. Orrick in San Francisco ruled that Twitter cannot be held liable for Islamic State’s 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.
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 (twtr) 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 Islamic State, also known as ISIS, an “unfettered” ability to maintain official Twitter accounts.
Get Data Sheet, Fortune’s technology newsletter.
“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.”