A federal appeals court on Wednesday rejected a lawsuit that sought to hold Twitter liable for the deaths of two U.S. contractors in Jordan three years ago in an attack for which the Islamic State group claimed responsibility.

The lawsuit failed to establish Twitter accounts used by IS directly caused the men's deaths, the 9th U.S. Circuit Court of Appeals said. The unanimous decision by a three-judge panel upheld a lower court ruling.

Lloyd Fields and James Creach were shot and killed in Jordan in 2015 by a Jordanian police captain while training law enforcement officers.

Their families argued that IS Twitter accounts were a substantial factor in the men's deaths and that the company should have anticipated attacks. They said Twitter knew about the accounts and that the accounts helped IS to recruit, raise money and spread its message.

The group "used Twitter accounts to amass the resources needed for carrying out numerous terrorist attacks, including the November 9, 2015 shooting in Amman, Jordan in which Mr. Fields and Mr. Creach were killed," Joshua Arisohn, an attorney for the families, said in a statement. He said he was considering an appeal.

An email to Twitter seeking comment was not immediately returned. The company said in court documents its service was available to anyone, and there was no allegation it provided any specialized platform to IS.

The 9th Circuit said the families had to show the Twitter accounts were a direct factor in the men's deaths, not just one that was forseeable.

The court cited a lower court judge's finding that the lawsuit showed no connection between the man who shot Fields and Creach and Twitter, or that the attack was impacted, helped or resulted in any way from IS's presence on the social media site.