Pfizer Inc said on Monday it won a patent infringement case against the U.S. unit of Teva Pharmaceutical Industries Ltd, preventing Teva from launching a generic version of Pfizer's erectile dysfunction drug Viagra until October 2019.

A federal court judge ruled on Friday that the patent under dispute was valid and enforceable. The decision, which affects about $1 billion in U.S. sales of Viagra, is subject to appeal.

The decision came as a surprise to analysts, most of whom had expected Viagra to lose market exclusivity in 2012. Pfizer's shares rose 2 percent to $18.23 in mid-morning trading on the New York Stock Exchange.

The ruling comes as Pfizer braces for the loss later this year of market exclusivity for its biggest-selling product, the cholesterol-lowering drug Lipitor, which had 2010 sales of nearly $11 billion.

"I think this is an important win for Pfizer," said Damien Conover, an analyst at Morningstar. "If you can hold on to $1 billion in sales of a high-margin product, that will definitely help offset the patent cliff Pfizer is facing."

A spokeswoman for Teva declined to comment on the ruling.

Analysts at Jefferies & Company estimate that the retention of U.S. Viagra sales is worth 3 percent to 4 percent in additional earnings per share.

Viagra generated nearly $2 billion in worldwide sales in 2010, of which roughly half came from the United States.

Pfizer, the world's biggest drugmaker, said litigation on the same patent remains pending against other generic companies, but no trials are scheduled in those cases.

"Teva is considered the strongest among the generic drugmakers when it comes to litigation, so the fact that Teva lost this doesn't augur well for the smaller competitors that lack the legal resources that Teva has," said Les Funtleyder, a portfolio manager at Miller Tabak & Co, which owns Pfizer shares but not Teva's.

Teva had challenged Pfizer's U.S. method-of-treatment patent, which covers the indication for which the drug is used. That patent expires in October 2019. The U.S. composition-of-matter patent is set to expire in March 2012.

Typically, it is the composition-of-matter patent that holds off competition. That Pfizer won the "use" patent may have something to do with its unusual development history.

Viagra, known also as sildenafil, was originally developed as a blood pressure treatment. Its impact on erectile dysfunction was discovered by accident. That discovery triggered a new "use" patent, which has enabled the company to hold off competition longer.

A lower-dose version of the drug, Revatio, is used to improve the ability to exercise in people with pulmonary arterial hypertension -- or high blood pressure in the vessels carrying blood to the lungs. It's patent expires in 2012.