Reversing decades of federal patent awards, the U.S. Supreme Court on Thursday unanimously ruled that human genes and the information they encode are not patent-eligible.

The ruling invalidated controversial patents held by Myriad Genetics Inc. on two genes whose mutations dramatically increase the risk of hereditary breast and ovarian cancer — the so-called BRCA1 and BRCA2 genes. Myriad discovered the exact location and sequence of the two genes, which enabled it to develop diagnostic tests for detecting the mutations and assessing a person’s cancer risk. The company’s patents gave it the exclusive right to do research and diagnostic testing of those genes and also to synthetically create BRCA DNA, known as complementary or cDNA.