On Friday, a federal circuit court made clear that Google Books is legal. A three-judge panel on the Second Circuit ruled decisively for the software giant against the Authors Guild, a professional group of published writers which had alleged Google’s scanning of library books and displaying of free “snippets” online violated its members’s copyright.

To some digital-rights followers, the Google Books case had seemed to drag on forever: The Authors Guild first filed suit 10 years ago. But the theory behind the eventual ruling was a quarter-century in the making.

In 1990, a district-court judge named Pierre Leval published an article in the Harvard Law Review proposing a new theory of fair use. In fact, the article was named “Toward a Fair Use Standard.” (The Harvard Law Review, by the way, had one month earlier elected its first black president.)

Fair use—which lets people use and adapt copyrighted works without getting the explicit permission of their owner—is a distinctly American concept. Instead of setting out specific statutory exemptions to copyright, as many other countries do, U.S. law issues four broad factors which guide whether the permission-less use of a copyrighted work is fair. This means that fair use can evolve and change over time; it also means that the only real way to find out if something is “fair use” is to ask a federal court.

Fair use might seem like an esoteric legal concept, but it’s what lets scholars cite copyrighted novels in their research—and what lets Big Dog sell movie-parody t-shirts. It’s also what lets me drop an image of one of those shirts into this story:

Big Dog

In his article, Judge Leval argued that the degree to which some kind of use transformed the original work should principally guide fair-use rulings. Fair use “must employ the quoted matter in a different manner or for a different purpose from the original,” he wrote:

A quotation of copyrighted material that merely repackages or republishes the original is unlikely to pass the test; in Justice Story’s words, it would merely “supersede the objects” of the original. If, on the other hand, the quoted matter is used as raw material, transformed in the creation of new information, new aesthetics, new insights and understandings, this is the very type of activity that the fair use doctrine intends to protect for the enrichment of society.

Leval then lists some example fair uses:

Transformative uses may include criticizing the quoted work, exposing the character of the original author, proving a fact, or summarizing an idea argued in the original in order to defend or rebut it. They also may include parody, symbolism, aesthetic declarations, and innumerable other uses.

“It’s a famous passage,” says James Grimmelmann, a law professor at the University of Maryland and the director of that school’s intellectual-property program. Leval had “written a couple of decisions that dealt with authors whose works engaged with existing ones and necessarily had to quote a lot. He put together an idea that wove together some major themes in the cases: Fair use protects people who make transformative uses of existing works.”

Four years later, the Supreme Court cited Leval’s article in the “2 Live Crew” case, which ruled that that rap group’s parody of “Pretty Woman”—which sampled Roy Orbison’s original—was a fair use because it was a parody.

“Based upon that, this idea of transformative use as the keystone to a lot of fair-use cases becomes dominant in U.S. courts,” Grimmelmann told me. “And what happens then over the next two decades is that the idea of transformative fair use itself gets extended to all kinds of new situations, including search engines.”

A series of decisions in the Ninth Circuit—the federal court of appeals that includes California, and, thus, Silicon Valley—found that software that searches web pages and images were so transformative as to be fair use. Showing a thumbnail image to someone to help them decide whether to go to a webpage, for instance, wasn’t the same as showing an image to entertain or inform.

This and other decisions, says Grimmelmann, were “very controversial because people say its abusing the concept of transformative use.”

Enter the Google Books case. In 2004, Google began scanning books—copyrighted and non-copyrighted alike—in academic libraries with the plan of making portions of that material available online for free. Users of Google Books now know how this works: You can search Google’s scanned-book database for a fact or a quote and see part of the page that includes that fact or quote. Google Books will then show you a “snippet” of the book without revealing the rest of the book. (It can also search its whole language database for certain words and chart their use over time, resulting in the infamous Google Ngrams.)

In 2005, the Authors Guild sued Google to halt the plan. The case has bounced through the courts since. The two parties almost settled in early 2011, when they proposed creating an online payment system that would have made Google Books more expansive than ever before—but a judge threw that out, saying it would give Google a “de facto monopoly.” In November 2013, that same judge, Denny Chin, issued a district-court ruling that found Google Books to be fair use.

“It advances the progress of the arts and sciences, while maintaining respectful consideration for the rights of authors and other creative individuals, and without adversely impacting the rights of copyright holders,” wrote Judge Chin.

The Authors Guild appealed to the Second Circuit. And there it wound up back in the lap of a familiar figure—Judge Pierre Leval. Would Leval rule that Google Books really wasn’t the kind of transformational use he had in mind back in 1990?

No: In fact he ruled the opposite. As Grimmelmann told me, it’s as if Leval is saying: “This is transformative use. They got it exactly right.”

“For nearly 300 years, since shortly after the birth of copyright in England in 1710, courts have recognized that, in certain circumstances, giving authors absolute control over all copying from their works would tend in some circumstances to limit, rather than expand, public knowledge,” writes the judge in his decision.

Later he summarizes:

Google’s unauthorized digitizing of copyright-protected works, creation of a search functionality, and display of snippets from those works are non-infringing fair uses. The purpose of the copying is highly transformative, the public display of text is limited, and the revelations do not provide a significant market substitute for the protected aspects of the originals.

In other words, Google Books is legal.

And not only that, but the case is likely resolved for good. In 2012, a district court ruled that Hathitrust, a university consortium that used Google Books’s scans to make books accessible to blind students, was not only a legal form of fair use but also required by the Americans with Disabilities Act. Experts say that the Supreme Court is unlikely to hear an appeal, because so many district court judges, and two different federal circuits, have found themselves so broadly in agreement about the nature of transformative use online.

“The Authors Guild is deluding itself to think that this is an area that is open and controversial in the view of the lower courts,” Grimmelmann said.

This isn’t only good news for fans of Google Books. It helps makes the legal boundaries of fair use clear to other organizations who may try to take advantage of it, including libraries and non-profits.

“It gives us a better senses of where fair use lies,” says Dan Cohen, the executive director of the Digital Public Library of America. They “give a firmer foundation and certainty for non-profits.”

Cohen also said that librarians and digital humanists working in other countries wished they had some of the legal protections present in the United States.

“I know from talking to my [international] peers they are very envious of our fair-use provision. They really have to operate under a much more restrictive world, where they’re not allowed non-commercial educational works that don’t destroy the marketplace,” he told me.

Of all the parts of Judge Leval’s decision, many people I talked to were happiest to see that it stressed that fair use’s importance went beyond any tool, company, or institution. “To me, I think a muscular fair use is an overall benefit to society, and I think it helps both authors and readers,” said Cohen.

A muscular fair use is precisely what Leval had in mind in his original 1990 article. “The copyright is not an inevitable, divine, or natural right that confers on authors the absolute ownership of their creations,” he wrote. “It is designed rather to stimulate activity and progress in the arts for the intellectual enrichment of the public.”