Image caption YouTube boasts the biggest video sharing audience in the world

Google has won a landmark ruling as a judge threw out a $1bn lawsuit brought by Viacom accusing the internet giant of allowing copyrighted material on its YouTube service without permission.

Viacom had accused Google of "massive intentional copyright infringement".

But the Manhattan judge said Google and YouTube could not be held liable merely for having a "general awareness" that videos might be posted illegally.

Media conglomerate Viacom said it planned to appeal against the decision.

Google called the ruling "an important victory".

'Safe harbour'

Viacom had claimed that "tens of thousands of videos" based on its copyrighted works had been posted on YouTube, and that both YouTube and its owner Google had known about it but had done nothing about it.

Image caption Viacom said many shows, including South Park, had been uploaded illegally

But District Judge Louis Stanton said in his ruling: "Mere knowledge of prevalence of such activity in general is not enough. The provider need not monitor or seek out facts indicating such activity."

Google and YouTube had argued that they were entitled to "safe harbour" protection under digital copyright law because they had insufficient notice of particular alleged offences.

Judge Stanton agreed, saying that when "YouTube was given notices, it removed the material... it is thus protected from liability" under a provision in the Digital Millennium Copyright Act.

'Not the end'

Viacom called the ruling "fundamentally flawed" and said it reflected neither Congress's intent behind copyright laws nor recent Supreme Court decisions.

Google welcomed the ruling. "This is 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 with each other," Google's Kent Walker said on the company's blog.

David Sohn, a lawyer for the Center for Democracy and Technology, said: "Without this decision, user-generated content would dry up and the internet would cease to be a participatory medium.

However, Laura Martin, an analyst at Needham, said the battle was not over.

"These issues are really important for content creators to protect their intellectual property against the usage by online aggregators. It is really important for content creator to get paid," she said.

"This is the beginning, not the end. Sumner [Redstone, Viacom's chairman] won't roll over and die on this."