Updated

A federal appeals court ordered YouTube on Wednesday to take down an anti-Muslim film that sparked violence in many parts of the Middle East.

The decision by a divided three-judge panel of the 9th U.S. Circuit Court of Appeals in San Francisco reinstated a lawsuit filed against YouTube by an actress who appeared in the video. The 9th Circuit said the YouTube posting infringed actress Cindy Lee Garcia's copyright to her role, and she, not just the filmmaker, could demand its removal.

The court's ruling addressed control of the clip, not its contents, which YouTube determined didn't violate its standards.

"Garcia's performance was used in a way that she found abhorrent and her appearance in the film subjected her to threats of physical harm and even death," Chief Judge Alex Kozinski wrote for the majority court. "Despite these harms, and despite Garcia's viable copyright claim, Google refused to remove the film from YouTube."

Garcia said she was duped into appearing in the film by the man behind it, Mark Basseley Youssef. She said the script she saw referenced neither Muslims nor Mohammad, and her voice was dubbed over after filming.

The 14-minute film, "Innocence of Muslims," depicts Mohammad as a religious fraud, pedophile and womanizer.

It sparked violence in late 2012, but YouTube rebuffed requests from President Barack Obama to take it down, arguing that only the filmmaker and not the actress owned the copyright.

The court said the actress owned the copyright to her performance because she thought it was for another film unrelated to what ultimately aired.