The two tech giants notified the judge that that "they have agreed to drop and settle their remaining claims and counterclaims in this matter".
Apple and Samsung have decided to end their epic patent infringement battle that began in 2011 and went all the way to the US Supreme Court.
In a filing at a district court in San Jose, California, late on Wednesday, the two tech giants notified the judge that that "they have agreed to drop and settle their remaining claims and counterclaims in this matter".
The terms of the settlement were not disclosed.
According to a report in CNET, Judge Lucy Koh signed the order, "dismissing all suits with prejudice, which means another case can't be filed on the same claim".
"Apple ignited the smartphone revolution with iPhone and it is a fact that Samsung blatantly copied our design. It is important that we continue to protect the hard work and innovation of so many people at Apple," the iPhone maker said in a statement.
"We're grateful to the jury for their service and pleased they agree that Samsung should pay for copying our products," it added.
Samsung, however, declined to comment.
In June, Samsung filed a motion with the US District Court in San Jose to appeal a verdict that asked the South Korean giant to pay Apple $539 million for copying patented iPhone designs.
Samsung was given the $539 million penalty in May as it was found infringing on five patents with Android phones it sold in 2010 and 2011.
The legal dispute between the two tech giants dates to 2011 when Apple sued Samsung. This led the South Korean tech giant to countersue the Cupertino, California-headquartered Apple in the same year.
Samsung lost the case in 2012. It was ordered to pay the US tech giant more than $1 billion for infringing on three of Apple's design patents related to mobile devices — the quick links to phone numbers, the slide-to-unlock feature and the auto-correct function.
Samsung's lawyers appealed the case, bringing down the compensation of $1 billion to $400 million in 2015 at the US Court of Appeals for the Federal Circuit.