Many biotechnology stocks fell on Tuesday as investors struggled to understand the impact of a ruling that threw out parts of two gene patents and called into question thousands more.

Stock market losses were muted, with two major indexes that track the shares of the industry falling by less than 1 percent each. In part, that was because biotechnology executives hastened to reassure their investors that the ruling would not necessarily undermine their businesses, at least in the short run.

But the executives themselves were struggling on Tuesday to figure out what the long-term impact would be. Biotech companies spend billions every year trying to develop new tests and treatments based partly on genes they have isolated and patented.

In a far-reaching ruling, Judge Robert W. Sweet anticipated a negative reaction from the industry. In a footnote of his 152-page ruling, he discounted fears that invalidating such patents would decimate the industry.

Some executives and lawyers who were interviewed on Tuesday disagreed with the judge's legal reasoning. They also said that the ruling, even in the worst case for them, would take years to have a significant effect.

Eventually, if the judge's reasoning is upheld on appeal, the invalidation of genetic patents could hit diagnostics companies, agricultural biotechnology companies and perhaps even traditional drug makers, though drugs are often protected by patents on their own chemical composition.

But the industry is already moving to a period of somewhat less dependence on DNA patents for its sustenance. Diagnostic laboratories, for instance, are shifting from testing individual genes to testing multiple genes or even a person's entire genome. When hundreds or thousands of genes are being tested at once, patents on each individual gene can become a hindrance to innovation rather than a spur.

On Monday, Mr. Sweet, a United States district judge in Manhattan, ruled that parts of patents held by Myriad Genetics covering two breast cancer genes, known as BRCA1 and BRCA2, were invalid.

Myriad analyzes those genes in an expensive test that predicts whether a woman is at a high risk of getting breast or ovarian cancer. The plaintiffs in the case, which included various medical groups and the American Civil Liberties Union, said the patents on DNA were illegal and impeded access to the testing.

The decision invalidating the gene patents stunned many lawyers who follow such issues.

"It's really quite a dramatic holding that would have the effect of invalidating many, many patents on which the biotechnology industry has invested considerable money," said Rebecca S. Eisenberg, a law professor at the University of Michigan who has written widely on gene patents.

The Genomics Law Report, an Internet journal, called the decision "radical and astonishing in its sweep." It headlined its article, "Pigs Fly."

Although patents are not granted on things found in nature, the DNA being patented had long been considered a chemical that was isolated from, and different from, what was found in nature. But Judge Sweet ruled that the distinguishing feature of DNA is its information content, its conveyance of the genetic code. And in that regard, he wrote, the isolated DNA "is not markedly different from native DNA as it exists in nature."

The immediate impact will be limited in part because the decision, made in a district court, does not apply to gene patents other than the ones it considered, and its value as precedent for other courts is limited.

Moreover, Myriad said Tuesday that it would appeal, and several lawyers said they expected the ruling to be overturned. Professor Eisenberg said "there isn't a whole lot of doctrinal support" for considering DNA as information rather than as a chemical.

Even before an appeal is decided, the landscape could change in a way that would render the Myriad case moot. A ruling is expected soon from the Supreme Court in the so-called Bilski case. That case does not directly concern gene patents - it is about a fight over a method of hedging risk in commodities trading - but it gives the Supreme Court a chance to set new standards on what is patentable.

"We are still waiting, holding our breath for the Bilski case," said Kari Stefansson, head of research at DeCode Genetics, which sells disease risk tests similar to those sold by Myriad.

If Judge Sweet's decision were upheld on appeal, the impact could be more far-reaching. The biggest impact would be on companies like Myriad and Athena Diagnostics that offer diagnostic tests based on genes.

Some biotechnology investors and executives say that lack of patent protection for DNA could diminish investment and remove incentives to develop tests. That could slow the move toward so-called personalized medicine, in which genetic tests are used to determine which drugs are best for which patients.

James P. Evans, a professor of genetics at the University of North Carolina, said that would not necessarily be the case. There is thriving competition in areas like testing for mutations that cause cystic fibrosis or Huntington's disease, even though no company has exclusivity.

"It's quite demonstrable that in the diagnostic area, one does not need gene patents in order to see robust development of these tests," he said.