Viacom and Greg Sandoval/CNET

Viacom has won an appeal in its copyright lawsuit against Google's YouTube, according to court documents.

The U.S. Second Circuit Court of Appeals sent the case back to a lower court to determine whether YouTube purposely ignored the infringing material that was posted to the site.

The decision is a setback for technology companies. It negates an earlier decision that set a favorable precedent about responsibility for policing Web sites. But today's decision only requires YouTube to defend itself in a lower court against the charges that it had prior knowledge of copyright infringement on its site.

In 2007, Viacom accused YouTube, which at that point had recently been acquired by Google, of encouraging users to illegally upload copyrighted clips of movies and TV shows. YouTube prevailed nearly two years ago, when a district court judge ruled that YouTube was an Internet service provider that qualified for protection under the Digital Millennium Copyright Act's safe harbor.

The court found that YouTube was protected from liability for the copyright infringing acts committed by users because it quickly removed pirated videos once notified by copyright owners.

Viacom maintained that YouTube did not qualify for DMCA protection because e-mails and other documentation showed that YouTube managers were aware of the copyright infringement and were in possession of tools that could prevent flagged content from being reposted, but took no action.

"We are pleased that the U.S. Court of Appeals has vacated and remanded the District Court's ruling," Viacom said in a statement. "This balanced decision provides a thoughtful way to distinguish legitimate service providers from those that build their businesses on infringement.

"The court delivered a definitive, common sense message to YouTube," Viacom continued. "Intentionally ignoring theft is not protected by the law. We are confident we will prevail when the merits of our case are heard."

A YouTube spokesperson gave CNET this statement:

The Second Circuit has upheld the long-standing interpretation of the DMCA and rejected Viacom's reading of the law. All that is left of the Viacom lawsuit that began as a wholesale attack on YouTube is a dispute over a tiny percentage of videos long ago removed from YouTube. Nothing in this decision impacts the way YouTube is operating. YouTube will continue to be a vibrant forum for free expression around the world.

The court said that the lower court should find out whether YouTube exercised "willful blindness."

Any bitterness that the two sides may feel over this trial hasn't stopped them from doing business with each other. Yesterday, Viacom's Paramount Pictures agreed to give YouTube access to 500 movie titles to rent to YouTube and Google Play users.

Updated at 10:15 a.m. PT: Added YouTube statement