UPDATE 2-Apple, Samsung settle U.S. patent dispute

(Adds background on U.S. Supreme Court case)

June 27 (Reuters) - Apple Inc and Samsung Electronics Co Ltd on Wednesday settled a seven-year patent dispute over Apple's allegations that Samsung violated its patents by "slavishly" copying the design of the iPhone.

Terms of the settlement, filed in the U.S. District Court for the Northern District of California, were not available.

In May, a U.S. jury awarded Apple $539 million, after Samsung had previously paid Apple $399 million to compensate for patent infringement. Samsung would need to make an additional payment to Apple of nearly $140 million if the verdict was upheld. How much, if anything, Samsung must now pay Apple under Wednesday's settlement could not immediately be learned.

An Apple spokesman declined comment. Samsung did not immediately return a request for comment.

Apple shares were up 0.3 percent at $184.79, while the Nasdaq Composite was down 1 percent. The Korea Exchange, where Samsung shares trade, is not currently open.

Apple and Samsung are rivals for the title of world's largest smartphone maker, and the dollar sums involved in the decision are unlikely to have an impact on either's bottom line. But the case has had a lasting impact on U.S. patent law.

After a loss at trial, Samsung appealed to the U.S. Supreme Court. In December 2016, the court sided unanimously with Samsung's argument that a patent violator does not have to hand over the entire profit it made from stolen designs if those designs covered only certain portions of a product but not the entire object.

(Reporting by Stephen Nellis in San Francisco; Editing by Lisa Shumaker and Bill Rigby)