This week, the biggest science patent dispute in decades is getting a hearing at the U.S. patent office headquarters. The invention in dispute is the gene-editing technique CRISPR, and at stake are millions, maybe even billions, of dollars for the winning side. CRISPR is the hugely hyped technology that could launch life-saving therapies, novel genetically modified crops, new forms of mosquito control, and more. It could—without much exaggeration—change the world.

Any company that wants to use CRISPR will have to license it from the patent dispute’s winner. Both parties embroiled in this fight are universities: MIT and the University of California, Berkeley, whose lawyers represent rival groups of scientists with claims to have first invented CRISPR. The Berkeley group published their work and filed for a patent first, by a few months—but the patent office ended up awarding a patent to the MIT group, due to some complicated procedural rules. The legal and scientific details of the dispute get pretty arcane pretty fast, but you can read some excellent reporting here, here, and here.

Cases like this don’t usually get to a hearing—they’re usually settled before both sides rack up the lawyer fees. As a journalist covering CRISPR, I’ve climbed down the legal and scientific rabbit hole before, and I’ve been left with one basic question: How did we get here? The research at both MIT and Berkeley that led to CRISPR—like much scientific research at universities—was funded by government grants, yet here are two universities fighting bitterly over the money that they will make from licensing out the technology to private companies.

It wasn’t always a given that biotech patents were a big (a.k.a. lucrative) deal. It wasn’t a given that universities could or should profit from federally funded research. And it wasn’t a given that discoveries around natural phenomena were even patentable, period.

If the story has a tipping point, it is the early 1970s, when scientists at Stanford and the University of California, San Francisco, invented recombinant DNA, opening the door to all forms of genetic modification. The universities patented the invention and licensed them to Genentech, then a fledging startup and later the first mega-successful biotech company. Stanford and UC San Francisco came out pretty well too; they got a combined $255 million from licensing the recombinant DNA patents.

* * *

It started with frogs.

In 1974, Stanley Cohen at Stanford and Herbert Boyer at the University of California, San Francisco, announced they had successfully spliced a gene from the amphibians into E. coli. Frog genes might only be the interest of scientists, but as subsequent New York Times article speculated, if scientists could get human genes into bacteria, they could turn E. coli into microbial factories pumping out human proteins like insulin. Diabetics at the time had to get their insulin from pigs or cows.

Recombinant DNA opened the door to scientists tinkering with DNA. Today, CRISPR is recombinant DNA’s technological successor—it allows scientists to editing genes with theoretically letter by letter precision. Recombinant DNA set the stage for CRISPR in the science world, and so the recombinant DNA patents set to the stage for the high-stakes CRISPR patent dispute.

Back in 1974, that Times article grabbed the attention of Niels Reimers, the head of Stanford’s patent and licensing efforts. Recombinant DNA wasn’t just a lab technique, he realized; it was potentially lucrative business opportunity.

Scientists weren’t used to thinking about patenting their research. Chemistry and physics professors at universities might occasionally patent chemical syntheses or processes, but basic research in biology stood a world apart. “Biology had this holier-than-thou idea that we were pure scientists doing pure research,” says Sally Smith Hughes, author of Genentech: The Beginnings of Biotech. (Her book and her oral histories of California’s early biotech industry were hugely instructive for piecing together this history.)

Cohen and Boyer were not, after all, seeking a cure for diabetes. They were just studying how bacteria could incorporate pieces of foreign DNA in their genomes. But as scientists figured out how to tinker with DNA in living organisms, they were in effect learning how to control new manufacturing processes in bacteria for insulin and other drugs. Techniques in basic biology suddenly had obvious applications in the real world.

CRISPR is the logical extension of these changes. The technology comes out of a naturally occurring system that bacteria use to shred the DNA of invading viruses. Microbiologists discovered CRISPR when they were studying an obscure part of the bacterial evolutionary tree. Once they realized how precise CRISPR was at targeting particular stretches of DNA, scientists realized it could be harnessed for gene editing.

In 1974, Stanford’s Reimers, who worked came to the university’s patent office by way of the technology industry, had to convince Cohen and Boyer that their discovery was even patentable. Boyer thought only the federal government could patent recombinant DNA because their work got funding from the National Institutes of Health. In fact, rules about patenting government-funded work varied agency by agency, and even within the NIH, the agency had different intellectual property agreements with different universities. Stanford’s allow the university to petition to patent NIH-funded worked. Cohen also got on board, after forfeiting any personal profit from the patent to Stanford—to avoid the taint of financial interest.

Then there was the matter of UCSF, Boyer’s home institution, which was needed as well to file a joint application. If Stanford’s patent office was unusually proactive, the University of California’s was unusually passive. Its patent administration was overstretched and the office was located at the Berkeley campus, an ultraliberal environment where profiting from academics discoveries was considered unseemly. UC didn’t even want to pay its half of the filing fees, Hughes writes in her book. But once Stanford agreed to pick up all of the fees, UC figured it had nothing to lose and put their name on the application. Stanford prepared all the patent paperwork and submitted an application in 1974.

* * *

Whether the patent would be granted was shaky. At the time, General Electric was fighting to patent a genetically modified bacteria that could break down crude oil. But living organisms could not be patented under law. In fact, the line between what was natural and what was manmade and patentable was unclear, as biologists were just getting into the patent game.

In 1980, all became clearer. The Supreme Court ruled 5-4 in Diamond v. Chakrabarty that the oil-chomping bacteria could be patented, along with all genetically modified organisms. The ruling opened on the gate to many biology-related patents held up at the patent office, including Cohen and Boyer’s.

By then, Boyer had co-founded Genentech, which was expressly looking to use recombinant DNA to make human drugs. He may have not been keen on patents initially, but he now had one foot in business with Genentech, another in academia with his professorship at UCSF. University professors co-founding biotech companies based on their research is now routine—in fact, the rival scientists behind CRISPR have at least three startups among them, depending on how you count—but it was nearly unheard of at the time. Plus, recombinant DNA research was controversial because of concerns about recombinant organisms escaping into the environment. At talks, Boyer remembered, “people were jumping up and yelling, ‘Is it true you’re patenting recombinant DNA? How can you do that?’”

The controversy also spilled out of academia. Tom Kiley, Genentech’s head counsel, recounted in an oral history: “I recall the Berkeley Barb”—a local underground paper—“at the time published a stinging attack on Boyer for having gone commercial and accompanied it with a graphic showing the intertwined serpents of the caduceus, but instead of serpents’ heads, there were fists grabbing greenbacks.”

Genentech went public in 1980 with a $35 million IPO. It was an eye-popping number for a company with still unproven technology, and the set the stage for later biotech companies. This year, two CRISPR startups had $94 million and $108 million IPOs.

Genentech tried but failed to exclusively license the Cohen-Boyer patents from Stanford and UC. The universities had decided to license the technology out non-exclusively—meaning any company could use the technology as long as they paid a modest licensing fee. This model is now considered the gold standard for biotech patents underlying such broadly applicable technologies.

Genentech ended up partnering with the pharmaceutical company Eli Lilly to make insulin, the first of Genentech’s many blockbuster drugs. Stanford and UC made their $255 million from licensing the patent to Genentech and other companies by the time it expired in 1997.

* * *

The patent story is not always a happy one. Once it was clear how much money and prestige was tied up in these patents, Genentech became embroiled in dozens of intellectual property disputes—several of them with the University of California. Genentech had licensed the Cohen-Boyer patents, but its scientists also made new patentable breakthroughs on the road to insulin, and these patents became matters of dispute.

By now, the UC patent office was more active. The UC system had a new patent administrator, Roger Ditzel, who had come from Iowa State University and headed Monsanto’s international business development before that. Genentech, Eli Lilly, and the UCSF system became entangled in six lawsuits over the new patents for the production of insulin. The lawsuits were consolidated and it ended with the university getting nothing, except a $12 million legal bill. In another case, UCSF and Genentech got into a decades-long battle over UCSF scientists recruited to Genentech, who were accused of taking material from their university labs to the company. That one ended with $200 million settlement for UCSF.

This entanglement of university patents and the biotech industry has since become routine. In 1980, Congress passed the Bayh-Dole Act, which allowed universities to patent federally funded research, doing away with the tangle of rules that had confused Boyer about whether the results of his NIH research were patentable. The point of the legislation wasn’t to reward the universities, says Rebecca Eisenberg, a patent law professor at the University of Michigan. In fact, Congress thought universities would be indifferent to patents, but it wanted to make research patentable to catch the interest of companies and stimulate economic growth.

“Although in theory this was not about bringing in money, once operation underway, that’s how [university patent offices] show their success, that they matter,” says Eisenberg. MIT and the University of California, Berkeley, both have strong patent offices now—as evidenced by the fact how hard they’ve fought this patent battle. Most patents don’t earn universities much money, if any, but CRISPR could be a blockbuster patent for the university that ends up with it.

Back in 1999, that $200 million settlement between Genentech and UCSF went to funding the university’s new research campus in San Francisco’s Mission Bay, a neighborhood that is now littered biotech startups. Part of the money also went toward constructing a new building on campus. So today, in the middle of UCSF’s Mission Bay campus, is Genentech Hall, a shiny glass-and-concrete symbol of the now close ties between academia and the biotechnology industry.