The court ruled that Actavis would not infringe patents held by Lilly if it marketed certain alternative salt forms of the drug, known generically as pemetrexed, in Britain, France, Italy and Spain in 2015, according to both companies on Thursday.

Lilly said it intended to appeal the decision as shares in the company fell 2 percent in early New York trading.

Actavis intends to sell its generic product soon after the basic patent on Alimta expires in December 2015, although the company added this was subject to it ultimately prevailing in any appeal.

Lilly argues it should still enjoy protection due to other patents that remain valid after 2015.

"Although Alimta's compound patents remain in force and are expected to provide exclusivity in major European countries through 2015, we continue to believe that Alimta's vitamin dosage regimen patents would be infringed by the entry of generic pemetrexed in Europe prior to June, 2021," Lilly's general counsel Michael Harrington said in a statement.

The additional patents cover administration of two nutrients - folic acid and vitamin B12 - to patients before and while they receive Alimta to prevent side effects.

The English High Court gave corresponding declarations of non-infringement regarding Alimta's vitamin dosage regimen patents in France, Italy and Spain - the first time that it has exercised such foreign jurisdiction for a European patent.

Actavis said combined sales of Alimta by Lilly in Britain, France, Italy and Spain were around 325 million euros (265 million pounds) in 2013.

Lilly is fighting other suits against its Alimta patents. A regional court in Germany recently ruled for Lilly on Alimta's vitamin dosage regimen patent. That case is under appeal.

In Indianapolis, where Lilly is based, a court is weighing the patent on the way the drug is administered in a case brought by generics maker Teva Pharmaceutical Industries Ltd. If Lilly wins, it would extend its hold on Alimta until 2022.

Lilly's global sales of lung cancer drug Alimta were $632 million in the first quarter.

Mark Schoenebaum, an analyst at ISI Group, said the UK court decision increased the odds that Lilly would lose broader European patent protection through 2021, contrary to market expectations.

On a worst-case basis - and assuming Lilly loses at appeal in the UK - Schoenebaum said the Alimta setback could lop 10-11 percent off earnings per share forecasts in the 2016-19 period, but the actual impact was likely to be materially less because of expected cost cutting.

By Ben Hirschler