A US judge Thursday dismissed a long-running lawsuit challenging Google's huge book digitization project, ruling that the scanning of millions of books is not copyright infringement.

Judge Denny Chin dismissed the case which dates back to 2005, saying Google's project is "fair use" under copyright law and "does not supersede or supplant books because it is not a tool to be used to read books."

Plaintiffs, led by the Authors Guild, had argued that Google's "Library Project" violated the rights of authors by scanning works without obtaining approval from the authors.

The Authors Guild had also argued that Google's objectives were purely commercial in that the main goal in the endeavor is to boost use of its search engine, which generates advertising revenue.

But Chin rejected most of the Guild's arguments in handing the tech giant a sweeping ruling.

Chin concluded that Google's use of the copyrighted works is "highly transformative" in that it enables readers, scholars and others to find out about new books and permits book text to be transformed "for purposes of substantive research, including data mining and text mining... thereby opening up new fields of research."

While Chin acknowledged that Google is a for-profit entity, he noted that Google does not sell the scans of the books or the snippets or "engage in the direct commercialization of copyrighted works."

While Google enjoys some commercial benefits, "the fact is that Google Books serves several important educational purposes," the judge said.

Google has scanned more than 20 million books so far in the project. Books in the public domain -- without current copyrights -- are made available online to the public for free. For copyrighted books Google offers a searchable database that displays snippets of text.