SAN FRANCISCO  Settling a legal battle, Google reached an agreement with book publishers and authors that clears the way for both sides to more easily profit from digital versions of printed books.

The agreement, under which Google would pay $125 million to settle two copyright lawsuits over its book-scanning efforts, would allow it to make millions of out-of-print books available for reading and purchasing online.

It outlines the framework for a new system that will channel payments from book sales, advertising revenue and other fees to authors and publishers, with Google collecting a cut.

The deal goes some way toward drawing a road map for a possible digital future for publishers and authors, who worried that they were losing control over how their works were used online, as the music industry has.