Oct 4 (Reuters) - Google Inc and a group of publishers have agreed to a settlement over making digital copies of books, capping seven years of litigation prompted by the search giant's effort to become the world's digital library.

Google and the Association of American Publishers (AAP) said on Thursday that U.S. publishers can decide whether they want their books made available through Google or not.

Google Books allows users to browse up to 20 percent of the books in its library and then purchase digital versions through Google Play. Publishers get a percentage of any sale.

Google has spent years scanning some 20 million books in partnership with major libraries around the world, including the New York Public Library and Stanford University Libraries. This angered publishers and authors who contended that Google violated copyright laws when it failed to seek their permission.

Google was sued in 2005 by the Authors Guild and the Association of American Publishers for violating copyright laws. In 2008, they reached a settlement in which Google agreed to pay $125 million to people whose copyrighted books had been scanned, and to locate and share revenue with the authors who have yet to come forward.

But the Justice Department, and other critics, said the deal was illegal. A federal court agreed, and rejected it.

The lawsuit was filed by AAP members McGraw-Hill Companies Inc , Pearson Education Inc and its sister Penguin Group USA, John Wiley & Sons and CBS Corp's Simon & Schuster.

The Authors Guild said that it would fight on.

"Google continues to profit from its use of millions of copyright-protected books without regard to authors' rights, and our class-action lawsuit on behalf of U.S. authors continues," Paul Aiken, executive director of the Authors Guild said in a statement.

The book industry has been reeling from a raft of challenges as more people use tablet devices like Amazon's Kindle and Apple's iPad to read books.

Also hanging over the industry has been the Justice Department's recent lawsuit against Apple and two publishers, alleging price fixing in the ebook market. Three other publishers settled, while the other defendants chose to fight the charges.

As these other challenges have emerged, the tussle over the digitization of books has grabbed less attention.

"I think it's only a big deal in that it indicates the end of this part of lawsuit, which was a big deal," said Jonathan Band, who represented a coalition of libraries.