Google and other online-content providers have dodged what they considered a First Amendment nightmare.

Weighing in on a global controversy, a federal appeals court on Monday found that YouTube can’t be forced to take down an anti-Muslim video that sparked worldwide protests, finding that such an order tramples on free speech rights.

The 9th U.S. Circuit Court of Appeals reversed a previous ruling and backed Google-owned YouTube in its legal battle with Cindy Lee Garcia, an actress who received death threats after she was spliced into a 2012 video called “Innocence of Muslims” that cast her as disparaging the prophet Mohammed.

A special 11-judge panel, with only one judge dissenting, backed Google and other Internet companies that howled in protest when the video was originally ordered removed from the Web a year and a half ago. The panel sympathized with Garcia’s plight but stressed that the law is not on her side.

“In this case, a heartfelt plea for personal protection is juxtaposed with the limits of copyright law and fundamental principles of free speech,” Judge M. Margaret McKeown wrote for the court. “The appeal teaches a simple lesson — a weak copyright claim cannot justify censorship in the guise of authorship.”

A divided three-judge 9th Circuit panel last year backed Garcia’s arguments, based on violations of federal copyright law, that she was duped into a performance that resulted in unrelenting death threats. Monday’s ruling erases the order requiring YouTube to take down the video, but the company did not say if it would restore the film.

“We have long believed that the previous ruling was a misapplication of copyright law,” a YouTube spokeswoman said Monday.

Garcia and her lawyer, Cris Armenta, expressed disappointment in the ruling, saying it has “artificially shrunk” the rights of actors to assert copyright claims and “shortchanges the threats on” Garcia’s life. However, Garcia indicated she is unlikely to appeal to the U.S. Supreme Court, saying she wants to “put this matter to rest.”

The removal order provoked widespread criticism from the online world, legal academics, media organizations and companies ranging from Twitter and Facebook to Netflix. They warned of apocalyptic consequences for Internet content providers if Garcia prevailed, calling the order to remove the film “alarming.”

These Internet giants argued that the ruling carved out unprecedented copyright protections for actors with even a bit role in every movie or video produced, at the same time allowing the courts to force companies such as YouTube to take down material protected by the First Amendment and vastly expanding companies’ responsibilities for policing Web content.

But to Garcia, the case was a simple quest to clear her name and protect her security, not an attack on the freewheeling Internet.

The showdown stems from Garcia’s minor, $500 role in a film originally called “Desert Warrior.” The movie never materialized, but Garcia later discovered her scene had instead been used in the anti-Muslim video “Innocence of Muslims.”

When released, it sparked protests in the Muslim world and was at one point cited in the debate over the fatal attacks on the U.S. embassy in Benghazi, Libya. As it turned out, Garcia’s voice was dubbed over with an insult to Mohammed. She has since been inundated with death threats, forcing her to live underground, according to court papers.

Despite powerful Silicon Valley opposition, Garcia did have backing in the case, including from Hollywood’s Screen Actors Guild, which urged the appeals court to find that actors can own copyrights to performances within movies.

Ninth Circuit Judge Alex Kozinski, the lone dissenter in Monday’s ruling, agreed with Garcia’s argument, saying an actor’s dramatic performance should be covered by copyright protections, allowing her to seek the takedown order.

Most legal analysts, however, say the 9th Circuit got it right the second time around, although UCLA law professor Eugene Volokh noted that the case posed “difficult questions.”

“This is a classic example of bad cases making bad law, in this case a very sympathetic actress who is duped into making a movie and gets a death threat, crying out for relief in getting the movie off the Internet search engines that allowed it to be viewed,” said Neil Smith, a Silicon Valley copyright lawyer. “The fraud committed on her, unfortunately, didn’t legally justify taking the movie … from the Internet.”

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz.