In recent years the world's most venerable libraries have played host to some incongruous visitors. In dusty nooks and far-flung stacks, teams of workers dispatched by Google have been beavering away to make digital copies of books. So far, Google has scanned more than 10 million titles from libraries in America and Europe – including half a million volumes held by the Bodleian in Oxford. The exact method it uses is unclear; the company does not allow outsiders to observe the process.

Why is Google undertaking such a venture, so seemingly out-of-kilter with its snazzy, hi-tech image? Why is it even interested in all those out-of-print library books, most of which have been gathering dust on forgotten shelves for decades? The company claims its motives are essentially public-spirited. Its overall mission, after all, is to "organise the world's information", so it would be odd if that information did not include books. Like the Ancient Egyptians who attempted to build a library at Alexandria containing all the known world's scrolls, Google executives talk of constructing a universal online archive, a treasure trove of knowledge that will be freely available – or at least freely searchable – for all.

The company likes to present itself as having lofty, utopian aspirations. "This really isn't about making money" is a mantra. "We are doing this for the good of society." As Santiago de la Mora, head of Google Books for Europe, puts it: "By making it possible to search the millions of books that exist today, we hope to expand the frontiers of human knowledge."

Dan Clancy, the chief architect of Google Books, offers an analogy with the invention of the Gutenberg press – Google's book project, he says, will have a similar democratising effect. He talks of people in far-flung parts being able to access knowledge as never before, of search queries leading them to the one, long out-of-print book they need.

And he does seem genuine in his conviction that this is primarily a philanthropic exercise. "Google's core business is search and find, so obviously what helps improve Google's search engine is good for Google," he says. "But we have never built a spreadsheet outlining the financial benefits of this, and I have never had to justify the amount I am spending to the company's founders."

It is easy, talking to Clancy and his colleagues, to be swept along by their missionary zeal. But Google's book-scanning project is proving controversial. Several opponents have recently emerged, ranging from rival tech giants such as Microsoft and Amazon to small bodies representing authors and publishers across the world. In broad terms, these opponents have levelled two sets of criticisms at Google.

First, they have questioned whether the primary responsibility for digitally archiving the world's books should be allowed to fall to a commercial company. In a recent essay in the New York Review of Books, Robert Darnton, the head of Harvard University's library, argued that because such books are a common resource – the possession of us all – only public, not-for-profit bodies should be given the power to control them.

The second, related criticism is that Google's scanning of books is actually illegal. This allegation has led to Google becoming mired in a legal battle whose scope and complexity makes the Jarndyce and Jarndyce case in Bleak House look straightforward.

At its centre, however, is one simple issue: that of copyright. The inconvenient fact about most books, to which Google has arguably paid insufficient attention, is that they are protected by copyright. Copyright laws differ from country to country, but in general protection extends for the duration of an author's life and for a substantial period afterwards, thus allowing the author's heirs to benefit. (In Britain and America, this post-death period is 70 years.) This means, of course, that almost all of the books published in the 20th century are still under copyright – and last century saw more books published than in all previous centuries combined. Of the roughly 40 million books in US libraries, for example, an estimated 32 million are in copyright. Of these, some 27 million are out of print.

Outside the US, Google has made sure only to scan books that are out of copyright and thus in the "public domain" (works such as the Bodleian's first edition of Middlemarch, which anyone can read for free on Google Books Search).

But, within the US, the company has scanned both in-copyright and out-of-copyright works. In its defence, Google points out that it displays only snippets of books that are in copyright – arguing that such displays are "fair use". But critics allege that by making electronic copies of these books without first seeking the permission of copyright holders, Google has committed piracy.

"The key principle of copyright law has always been that works can be copied only once authors have expressly given their permission," says Piers Blofeld, of the Sheil Land literary agency in London. "Google has reversed this – it has simply copied all these works without bothering to ask."

In 2005, the Authors Guild of America, together with a group of US publishers and publishers, launched a class action suit against Google that, after more than two years of wrangling, ended with an announcement last October that Google and the claimants had reached an out-of-court settlement. The full details are staggeringly complicated – the text alone runs to 385 pages – and trying to summarise it is no easy task. "Part of the problem is that it is basically incomprehensible," says Blofeld, one of the settlement's most vocal British critics.

Broadly, the deal provides a mechanism for Google to reimburse authors and publishers whose rights it has breached (including giving them a share of any future revenue it generates from their works). In exchange for this, the rights holders agree not to sue Google in future.

The settlement stipulates that a body known as the Books Rights Registry will represent the interests of US copyright holders. Authors and publishers with a copyright interest in a book scanned by Google who make themselves known to the registry will be entitled to receive a payment – in the region of $60 per book – as compensation.

Additionally, the settlement hands Google the power – but only with the agreement of individual rights holders – to exploit its database of out-of-print books. It can include them in subscription deals sold to libraries or sell them individually under a consumer licence. It is these commercial provisions that are proving the settlement's most controversial aspect.

Critics point out that, by giving Google the right to commercially exploit its database, the settlement paves the way for a subtle shift in the company's role from provider of information to seller. "Google's business model has always been to provide information for free, and sell advertising on the basis of the traffic this generates," points out James Grimmelmann, associate professor at New York Law School. Now, he says, because of the settlement's provisions, Google could become a significant force in bookselling.

Interest in this aspect of the settlement has focused on "orphan" works, where there is no known copyright holder – these make up an estimated 5% to 10% of the books Google has scanned. Under the settlement, when no rights holders come forward and register their interest in a work, commercial control automatically reverts to Google. Google will be able to display up to 20% of orphan works for free, include them in its subscription deals to libraries and sell them to individual buyers under the consumer licence.

"The deal has in effect handed Google a swath of intellectual copyright. It is a mammoth potential bookselling market," says Blofeld. He adds it is no surprise that Amazon, which currently controls 90% of the digital books market, is becoming worried.

But Dan Clancy of Google dismisses the idea that, by gaining control over out-of-print and orphan works, Google is securing for itself a significant future revenue stream. He points out that out-of-print books represent only a tiny fraction of the books market – between 1% and 2%. "This idea that we are gaining access to a vast market here – I really don't think that is true."

James Gleick, an American science writer and member of the Authors Guild, broadly agrees. He says that, although Google's initial scanning of in-copyright books made him uncomfortable, the settlement itself is a fair deal for authors.

"The thing that needs to be emphasised is that this so-called market over which Google is being given dominance – the market in out-of-print books – doesn't currently exist. That's why they're out of print. In real life, I can't see what the damage is – it's only good."

It is by no means certain that the settlement will be enacted – it is the subject of a fairness hearing in the US courts. But if it is enacted, Google will in effect be off the hook as far as copyright violations in the US are concerned. Many people are seriously concerned by this – and the company is likely to face challenges in other courts around the world.

Over the coming months, we will hear a lot more about the Google settlement and its ramifications. Although it's a subject that may seem obscure and specialised, it concerns one of the biggest issues affecting publishing and, indeed, other creative industries – the control of digital rights.

No one knows the precise use Google will make of the intellectual property it has gained by scanning the world's library books, and the truth, as Gleick points out, is that the company probably doesn't even know itself. But what is certain is that, in some way or another, Google's entrance into digital bookselling will have a significant impact on the book world in years to come.