A federal judge has thrown out Viacom's lawsuit accusing Google of posting its programs on YouTube without permission, a year after a federal appeals court had revived the landmark copyright infringement case.

For the second time in three years, U.S. District Judge Louis Stanton in Manhattan rejected Viacom's damages claims over Google's alleged unauthorized posting of clips from "The Daily Show with Jon Stewart," "South Park," "SpongeBob SquarePants" and other programs that viewers had uploaded to YouTube.

Stanton agreed that Google and YouTube were protected from Viacom's copyright claims by the "safe harbor" provisions of the Digital Millennium Copyright Act.

That 1998 federal law made it illegal to produce technology to circumvent anti-piracy measures, while limiting liability of online service providers for copyright infringement by users.

Viacom had in 2007 filed its $1 billion lawsuit against YouTube and others, and has accused YouTube of broadcasting 79,000 copyrighted videos on its website between 2005 and 2008.

Stanton had ruled for YouTube in June 2010. The 2nd U.S. Circuit Court of Appeals in New York revived Viacom's case last April, but Thursday's decision restores YouTube's original victory.

Viacom said it plans to appeal. "This ruling ignores the opinions of the higher courts and completely disregards the rights of creative artists," spokesman Jeremy Zweig said in an email. "A jury should weigh the facts of this case and the overwhelming evidence that YouTube willfully infringed."

Kent Walker, Google's general counsel, welcomed the decision. "Congress got it right when it comes to copyright on the Internet," he said. "This is a win not just for YouTube, but for people everywhere who depend on the Internet to exchange ideas and information."