The ruling brings to a close a lawsuit that has ran for over three years, with Viacom originally filing a suit against YouTube back in March 2007, claiming that Google was responsible for widespread copyright infringement of its content on YouTube.
Safe harbor for YouTube
Viacom had filed over 100,000 takedown orders against YouTube back in February 2007, claiming that 160,000 unauthorised clips from its shows had been viewed over 1.5 billion times on the site.
YouTube complied with those takedown orders, removing most of the material from the site immediately.
In the latest 30-page ruling, U.S. District Judge Louis Stanton said he was convinced that YouTube had done what was required to fall under the "safe harbor" provisions of US copyright law.
Judge Stanton noted that there was no dispute that "when YouTube was given the (takedown) notices, it removed the material."
Viacom to appeal
For its part, Viacom plans to appeal the latest ruling, which it claims to be "fundamentally flawed."
Perhaps most embarrassingly, Viacom employees had been secretly uploading thousands of videos to YouTube in order to generate publicity for their shows.
The documents filed by YouTube also revealed that: "Viacom's efforts to disguise its promotional use of YouTube worked so well that even its own employees could not keep track of everything it was posting or leaving up on the site.
"As a result, on countless occasions Viacom demanded the removal of clips that it had uploaded to YouTube, only to return later to sheepishly ask for their reinstatement. In fact, some of the very clips that Viacom is suing us over were actually uploaded by Viacom itself."
Kent Walker, Google's lawyer in the case, said that the decision marked "an important victory not just for us, but also for the billions of people around the world who use the web to communicate and share experiences."
Get daily insight, inspiration and deals in your inbox
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis and more from the TechRadar team.