The eight-year-long legal battle over Google Books has finally come to a close. A judge ruled on Thursday that the search giant's scanning of millions of books falls under fair use and doesn't infringe the copyrights of the books' authors.

The ruling (.PDF), issued by U.S. Circuit Judge Denny Chin in New York, ends the legal scuffle among the publishing trade group The Authors Guild, several individual authors and Google, as first reported by GigaOM. Google began scanning books in 2004 with the goal of publishing snippets in search results.

See also: 12 Books to Cozy Up With This Fall

The ruling is a clear win for Google, which faced more than $3 billion in damages, not to mention the $40 million spent annually on the project. Judge Chin found that Google Books, which he defined as an "invaluable research tool," in fact helps authors.

"Google Books provides significant public benefits," Judge Chin said in the ruling. "It advances the progress of the arts and sciences, while maintaining respectful consideration for the rights of authors and other creative individuals, and without adversely impacting the rights of copyright holders."

For Internet law experts, this is a win for the public as well.

"The biggest winners today are scholars and libraries; the discussion of public benefits focus heavily on research and access," James Grimmelmann, a professor of law at the University of Maryland, tweeted.

The Authors Guild has now the option of appealing the ruling. Publishers Weekly predicts they will:

Disappointed Authors Guild will appeal Google decision. — Publishers Weekly (@PublishersWkly) November 14, 2013

In the meantime, however, Google celebrated the news.

"This has been a long road and we are absolutely delighted with today’s judgement," Google said in a statement to AllThingsD. "As we have long said, Google Books is in compliance with copyright law and acts like a card catalog for the digital age — giving users the ability to find books to buy or borrow."

Can you view the full ruling below:

Google Books Ruling

Image: iStockphoto, ytwong