(Reuters) - A federal judge in Delaware has overturned a jury’s verdict requiring Gilead Sciences Inc to pay a record $2.54 billion because its hepatitis C drugs Sovaldi and Harvoni infringed a patent held by rival Merck & Co Inc.

The logo of Gilead Sciences Inc is pictured during a news conference in New Delhi September 15, 2014. REUTERS/Anindito Mukherjee/File Photo

The verdict had been the largest ever in a U.S. patent case but U.S. District Judge Leonard Stark in Wilmington, Delaware, on Friday ruled Merck’s patent was invalid. He said it did not meet a requirement that it disclose how to make the treatment it covered without undue experimentation.

Gilead in a statement on Saturday said it always believed the patent was invalid and was pleased the judge confirmed that opinion.

Merck in a statement said it planned to appeal and believed the judge’s ruling did not reflect the facts of the case.

The December 2016 verdict followed a trial in which jurors found that Merck’s patent on hepatitis C treatments, which it acquired in 2014 when it bought Idenix Pharmaceuticals, was valid.

Hepatitis C, estimated to infect about 3.2 million Americans, is a viral disease that causes inflammation of the liver that can lead to liver failure.

Direct-acting antivirals, such as Gilead’s Sovaldi and Harvoni, have revolutionized treatment, with cure rates of more than 90 percent shown in clinical trials.

But there was a backlash from health insurers and other payors when Gilead launched Sovaldi at a price of $84,000 for a 12-week course.

Foster City, California-based Gilead reported that in 2017 it earned $9.1 billion on its four products to treat hepatitis C, including Harvoni and Sovaldi.

Idenix, the original holder of the patent at issue in the lawsuit, sued Gilead in 2013 in an effort to block the launch of Sovaldi, which was approved by the U.S. Food and Drug Administration in December of that year.

Harvoni, which combines Sovaldi’s active ingredient, sofosbuvir, with another drug, was approved in October 2014.

Merck sells its own hepatitis C drug, Zepatier. The company won a $200 million jury verdict last March in a separate patent infringement case against Gilead over hepatitis C drugs.

But in June 2016, a federal judge in San Jose, California, overturned that verdict after finding that Merck engaged in a pattern of unethical conduct, including lying under oath. Merck has disputed the judge’s ruling and is appealing.

The case is Idenix Pharmaceuticals LLC et al v. Gilead Sciences Inc, U.S. District Court, District of Delaware, No. 14-cv-00846.