(Reuters) - A U.S. appeals court upheld AstraZeneca Plc (>> AstraZeneca plc) and Ranbaxy Laboratories' victory in a lawsuit accusing them of reaching an illegal deal to delay the launch of a generic version of AstraZeneca's heartburn drug Nexium.

A panel of the 1st U.S. Circuit Court of Appeals in Boston on Monday refused to throw out a December 2014 jury verdict in favour of AstraZeneca and Ranbaxy, which was acquired in March 2015 by Sun Pharmaceutical Industries Ltd (>> Sun Pharmaceutical Industries Limited).

The judges rejected arguments by drug wholesalers and health plans that the jury was prevented from hearing certain arguments and evidence, and was given improper instructions.

Plaintiffs had estimated the potential damages at $4 billion (3.2 billion pounds) to $20 billion or more in court filings.

Thomas Sobol, an attorney for the plaintiffs, could not immediately be reached for comment.

The class action lawsuit, filed in 2012 in Boston federal court, accused AstraZeneca of paying Ranbaxy nearly $700 million to drop a challenge to AstraZeneca's patents on Nexium and delay launching a generic version of the drug.

It got a boost in 2013, when the U.S. Supreme Court ruled that such deals, sometimes called pay-for-delay deals, may violate antitrust laws if they involve a "large and unjustified" payment from a brand-name drugmaker to a generic drugmaker that suppresses competition.

The lawsuit against AstraZeneca and Ranbaxy was the first pay-for-delay case to go to a jury after that ruling.

It originally also targeted two other generic drugmakers that reached deals with AstraZeneca over Nexium, - Teva Pharmaceutical Industries Ltd and Dr. Reddy's Laboratories Ltd - but both settled before trial.

The jury found that AstraZeneca had made a large and unjustified payment to Ranbaxy, but that the plaintiffs had not proven that they were harmed by it.

Ranbaxy's settlement with AstraZeneca gave it the right to start selling generic Nexium exclusively in May 2014, but it failed to win approval from the U.S. Food and Drug Administration in time. Teva became the first company to win approval for generic Nexium in January 2015.

(Reporting By Brendan Pierson in New York; editing by Grant McCool)

By Brendan Pierson

Stocks treated in this article : AstraZeneca plc, Sun Pharmaceutical Industries Limited