(Reuters) - A U.S. appeals court said on Friday that the discovery of a new form of prenatal testing that avoids the risks of invasive medical techniques was good for science but did not deserve a patent.

The U.S. Court of Appeals for the Federal Circuit in the District of Columbia said a patent held by genetic testing company Sequenom Inc on detecting fetal DNA in a pregnant woman's blood was invalid. The decision by the nation's top patent court upholds a ruling by a lower federal court in California and clears Roche Holding AG unit Ariosa Diagnostics of infringement.

The appeals said the DNA's presence in the blood fell under the U.S. Supreme Court's rule against patenting natural phenomena.

The decision is the latest to interpret two Supreme Court decisions from 2012 and 2013 that made it harder to obtain patents on naturally occurring substances and the tests used to detect them, potentially putting a wide swath of biotech patents at risk.

Sequenom's innovation was in finding a way to use DNA found in maternal blood samples that had previously been discarded as medical waste in order to determine certain fetal characteristics, such as gender. The method avoided the risk of more-invasive tests, such as taking samples from the fetus or placenta, the decision said.

But this innovation was still was not enough to deserve a patent, the appeals court said.

While calling the test "a positive and valuable contribution to science," the court said: "Even such valuable contributions can fall short of statutory patentable subject matter, as it does here."

Shares of Sequenom were up 2 cents at $3.34 in midday trading.

The case originated in 2011 and 2012 when San Diego-based Sequenom and San Jose, California-based Ariosa sued each other over the patent. Sequenom said Ariosa infringed with its Harmony prenatal test.

When U.S. District Judge Susan Illston of San Francisco denied Sequenom's bid for a preliminary injunction in 2012, the Federal Circuit ordered her to take another look at the case in light of the Supreme Court's 2013 Myriad ruling, which said DNA sequences could not be patented.

Illston later invalidated the patent, a decision the appeals court affirmed on Friday.

(Reporting by Andrew Chung)