FORTUNE — Amazon’s dominance in digital books is under perpetual attack by Google (GOOG) and Apple (AAPL). Now you can add another threat to the list: the public library. That’s what an analyst from Barclays suggested in a recent research report. Consumers will likely avoid buying e-books if they can borrow them from the library for free.
“As e-reader users become more familiar with the library system’s free alternative, and as libraries reduce the friction associated with borrowing e-books, we believe digital content revenue growth at Amazon may soften,” said Anthony DiClemente, a Barclays analyst.
OK, sure. But could Amazon (AMZN), tech’s behemoth retailer, really be threatened by the neighborhood library — a centuries-old institution known for musty shelves, high school cram sessions, and “Shhhhhh. Quiet please?” The answer is complex. Much hinges on whether libraries and publishers can iron out differences that have limited the selection of e-books available for lending.
Having said that, libraries have coexisted just fine with physical bookstores over the years. People who wanted to read the latest bestsellers tended to buy them rather than checking them out. Libraries served more as a supplement, particularly for people who couldn’t afford paying for new books. Why should the dynamics in the digital era be any different?
MORE: Big change may not be change enough for Microsoft
“I think Amazon is going to be strong for a while,” said Carrie Russell, who handles digital book and copyright issues for the American Library Association. The fact that Amazon’s shoppers can load up on e-books, along with virtually anything else, makes its service that much more indispensable, she continued.
Amazon declined to comment about any rivalry with libraries.
Superficially, libraries seem to be on the ball with digital books. Just over three-quarters of libraries lend e-books, according to a survey last fall by the American Library Association. Even people who do not own an e-reader can often check them out from their local branch. Nearly 40% of libraries let patrons borrow Kindles, Nooks, or other similar devices, the survey found.
The convenience of downloading library e-books is debatable. Many libraries let people do it from home. Some others require visiting the library branch in person. The actual mechanics can be a bit complicated for some patrons because libraries sometimes have multiple e-book catalogues.
But the most serious challenge facing libraries is that most have relatively few e-books to chose from. The Alexandria Library, in Virginia, has 35,000 digital titles vs. 450,000 in print, for example. A lack of money for buying new digital books is a big hurdle, for sure. But there are other factors at play.
MORE: Detroit’s silver lining
Publishers, fearful that selling to libraries will hurt sales to the general public, have thrown up roadblocks. Some major publishers jack up the price libraries pay for e-books compared to what they charge the public. Others make only a small number of titles available, delay their availability until weeks after the general release, or require libraries to buy another copy after lending it 26 times.
Such policies actually mark an improvement over the recent past. Until earlier this year, some major publishers refused to sell to libraries at all.
Public awareness that libraries lend e-books will play a key role in whether Amazon’s digital book business erodes, Barclays said. As it is, relatively few people know about borrowing digital books, although their numbers are growing. A survey last year by the Pew Internet & American Life Project found that 31% of the public was aware that libraries lend e-books, up from 24% in 2011. Only 5% of people actually had checked out a digital book compared with 3% in the prior year, Pew found.
“E-books are becoming more important, and we do expect them to grow going forward,” said Christopher Platt, director of the joint technology team for the New York and Brooklyn public libraries. “Digital is not a boutique service. It’s part of the future of the library.”
The New York Public Library has 84,000 e-book titles available. Of the 11 million books checked out during the nine-month period ending in April, 7.3% were e-books.
One thing the Barclays analyst failed to mention in his report is that Amazon is trying to market itself within libraries. Amazon is among a handful of booksellers that have partnered with OverDrive, a company that supplies libraries with e-book catalogues. People who search a catalogue may see an Amazon “Buy it Now” button if a book, CD, or DVD they want is unavailable. Instead of putting their name on a waiting list, people can simply buy a copy from Amazon and have it shipped to their doorstep.
MORE: Making big data seem minuscule
“Amazon is willing to support the community,” said Rose Dawson, director of the Alexandria Library, which started connecting its patrons with Amazon a few weeks ago. “It will actually draw more people to them.”
Libraries have a financial incentive to play along. For every sale, libraries get a commission of around 10%. It’s hard to pass up on the extra money in an era of deep budget cuts. Some libraries like Alexandria’s also place an Amazon button on their home pages, which the public can use, in theory, to buy televisions, computers, and cat food in addition to books.
Sales, however, have been modest at the New York Public Library, which has been testing the program for the past year. In addition to Amazon, library patrons can shop at Barnes & Noble and IndieBound. So how much has the library earned from the three retailers? Just $800.