A U.S. appeals court on Friday overturned a $120 million jury verdict against Samsung, finally handing the South Korean smartphone maker a significant win in its longstanding patent feud with top rival Apple.

The U.S. Court of Appeals for the Federal Circuit in Washington, D.C., said Samsung Electronics Co Ltd did not infringe Apple’s “quick links” patent, and that two other patents covering the iPhone’s slide-to-unlock and auto-correct features were invalid. The court also said Apple was liable for infringing one of Samsung’s patents.

In a statement, a Samsung spokeswoman said: “Today’s decision is a win for consumer choice and puts competition back where it belongs – in the marketplace, not in the courtroom.”

Apple and Samsung have been battling over mobile device technology patents for years. Apple has mostly prevailed, and in December, Samsung paid Apple $548.2 million stemming from a separate patent case, which Samsung has appealed to the U.S. Supreme Court.

Friday’s ruling was issued by a unanimous three-judge panel of the Federal Circuit, the country’s top court specializing in patent issues.

The ruling reverses a May 2014 verdict from a federal court in San Jose, California ordering Samsung to pay $119.6 million for using Apple’s patented technology without permission.

Infringement of the quick links feature, which allows the device to recognize data on the touchscreen, such as a phone number, and link to it to make a call, accounted for nearly $99 million of the damages.

While the appeals court said that Samsung did not use the same technology to detect and link to specific data, it also said Apple’s other patents were obvious compared to previously known inventions and should never have been granted.

Chicago-based patent lawyer Bradley Hulbert, who has followed the litigation, said the decision is “a clear signal that Apple is not invincible and that alternative operating systems are here to stay.

The marketing and psychological benefits for Samsung are huge.”

Rutgers Law School professor Michael Carrier said Apple “rolled the dice” by going to court and today’s decision “shows that the patent wars really are not worth it.”

The case is Apple Inc v. Samsung Electronics Co Ltd et al, in the U.S. Court of Appeals for the Federal Circuit, No. 15-1171.