Google won a decisive victory on Friday in a copyright-infringement case that the Authors Guild originally launched almost a decade ago. A federal appeals court ruled that the company’s book-scanning project, which has turned millions of books into searchable digital files, is entitled to the full protection of the “fair use” clause in copyright law.

The case is hugely important, not just for Google (now part of a larger holding company called Alphabet) and the authors whose works are being digitized, but for the principle of fair use itself. Copyright law may be murky and difficult to pin down at the best of times, but interpreting the concept of fair use often makes regular copyright law look like a day at the beach.

That’s because what qualifies as fair use—which theoretically lets anyone use copyrighted content without having to get permission from the creator or rights-holder—isn’t specifically spelled out in federal copyright law. It’s something that ultimately has to be decided by a court, and even then the judges have to consider four factors before they can come to a decision. Those factors are:

  1. The purpose of the infringing use, specifically whether it qualifies as “transformative”
  2. The nature of the original content (i.e., whether it is artistic or commercial)
  3. The amount and “substantiality” of the original content that is used in the derivative work
  4. Whether the infringing use will affect the market for the original product or content

What’s interesting about the Google case is that this isn’t just some random website using an animated GIF of a football game — as happened recently with Deadspin, which got the site’s Twitter account suspended briefly (incorrectly, I would argue). This is a $450-billion web giant copying millions of books, and then using them in part to feed its massive, money-spinning search empire.

Does fair use apply to web giants?

The part about Google being a multibillion-dollar entity was clearly what caused the Authors Guild to fight the case for so long—arguably long after it had already become obvious that it would probably lose. For the Guild, this was a classic case of David versus Goliath, with book authors representing the David character and Google the clearly evil Goliath using the work of others for its own purposes.

The appeals court, however, pointed out in its decision that the purpose of copyright law is not to guarantee authors a living, nor is it to give them exclusive control over who uses their work and how. The purpose of the law is to provide an incentive for people to create artistic works because doing this benefits society—and ultimately, the social benefit of Google Books outweighed the infringement aspect.

The key part of the ruling is that the book-scanning project was fundamentally “transformative” in nature. In other words, Google isn’t just copying the books it scans and indexes — it uses those copies to provide searchable “snippets” or short sections of each work so that users can find books more easily.

Book search is a public good

What Google does is significantly different from simply copying books wholesale and then putting them on the Internet, the court said. And it provides a clear social benefit. It also provides a potential benefit to authors themselves, since it makes their work much easier to find, which is why some authors opposed the long-running case launched by their union. But the Guild refused to give up.

The Guild says that it plans to appeal the case to the Supreme Court, but copyright experts like law professor James Grimmelmann say it is unlikely that they will be successful, given the history of previous decisions in the case.

If the fair use aspect of Google Books wasn’t already obvious, a recent decision by another federal court—in a case related to the Authors Guild vs. Google—showed that the Guild’s challenge was likely to fail. In that case, the authors’ group sued the Hathi Trust, a collective of universities that partnered with Google on the scanning project. In 2012, a federal court rejected the Guild’s argument and found that what Google was doing clearly qualified as fair use.

This is the second time that a Google GOOG service has been ruled to be fair use (if you don’t count the previous decisions in the Authors Guild case). In 2007, the company won a case launched by the adult entertainment company Perfect 10, which argued that Google was infringing its copyright by posting thumbnail images of its photos. The court decided that this use was also “transformative” and that the benefits of providing a searchable index of thumbnails outweighed any infringement.

The Google Books decision doesn’t mean that the web giant can do whatever it wants with other people’s content and have that covered by fair use. But it does invalidate the argument that something done by a commercial entity can’t possibly qualify as fair use. And that’s an important point at a time when copyright holders seem to have all the power, and fair use often gets overlooked because it is seen as too confusing and not relevant.

You can follow Mathew Ingram on Twitter at @mathewi, and read all of his posts here or via his RSS feed. And please subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.