After nearly five days of deliberations, a U.S. jury on Thursday said Samsung Electronics Co Ltd should pay $539 million Apple Inc for copying patented smartphone features, technology publication CNET reported, bringing a years-long feud between the technology companies into its final stages.

The world’s top smartphone rivals have been in court over patents since 2011, when Apple filed a lawsuit alleging Samsung’s smartphones and tablets “slavishly” copied its products. Samsung was found liable in a 2012 trial, but a disagreement over the amount to be paid led to the current retrial over damages where arguments ended on May 18.

Samsung previously paid Apple $399 million to compensate Apple for infringement of some of the patents at issue in the case. The jury has been deliberating the case since last week.