WASHINGTON - The Supreme Court ruled Thursday that naturally occurring human genes may not be patented, potentially opening up commercial and scientific terrain to more freewheeling exploration.

In a unanimous decision that is a mixed bag for the multibillion-dollar pharmaceutical and biotechnology industries, the court distinguished between genes found in the human body and those created in the lab.

"A naturally occurring DNA segment is a product of nature and not patent-eligible merely because it has been isolated," Justice Clarence Thomas wrote for the court.

At the same time, Thomas and his fellow justices determined that so-called "complementary DNA," which is synthetic, is "patent-eligible because it is not naturally occurring."

The 18-page decision in the closely watched case rejects several patent claims filed by a Utah-based company called Myriad Genetics. Myriad obtained patents, and with them a profitable monopoly, on the exact location of two genes associated with a higher risk of developing breast or ovarian cancer. Individual scientists who felt constrained by Myriad's patents sued, along with a group called the Association for Molecular Pathology.

"We are thrilled," said American Civil Liberties Union attorney Sandra S. Park, who argued the case. "The question before the court was a simple one, but it had profound consequences."

The ruling Thursday means that competing firms now have a freer hand in developing cancer-testing tools that involve the genes for which Myriad held the patents. More broadly, Park said the ruling could call into question the validity of patents that have been issued for about 4,000 other human genes.

"As a result of this, the cost of genetic testing should come down significantly," said Dr. Harry Ostrer, a medical geneticist at the Albert Einstein College of Medicine who challenged Myriad's patents. "I think we will see a much more level playing field. It will drive down costs and improve quality."

Park added that the court's reasoning perhaps could be applied to challenges of patents that have been issued for nonhuman isolated genes as well.

Myriad officials accentuated the positive in the court's decision, stressing how the court agreed that lab-synthesized genes, dubbed cDNA, still may be patented, as may the scientific methods used in isolating genes.

"We believe the court appropriately upheld our claims on cDNA, and underscored the patent eligibility of our method claims, ensuring strong intellectual property protection for our (gene) test moving forward," Peter D. Meldrum, Myriad's president and CEO, said in a prepared statement.

A gene is a segment of DNA. It defines physical traits, such as eye color and sex, and can influence whether an individual develops conditions such as obesity, diabetes and Alzheimer's disease.

About 22,000 genes make up the human genome, the basis of human inheritance. Genes must be removed from the body and isolated in order to be studied and utilized.

Scientists with Myriad, a company based in Salt Lake City that had revenues of $496 million last year, used mapping tools to identify the genes associated with mutations that predispose women to breast and ovarian cancers. Scientists called these the BRCA1 and BRCA2 genes.

The average American woman has a roughly 12 percent lifetime risk of developing breast cancer. Women with BRCA mutations, though, face a cumulative risk of up to 85 percent.