A US judge has ordered a new trial to determine how much Samsung should pay Apple for copying the look of the iPhone.

US District Judge Lucy Koh in San Jose, California issued her order late on Sunday, ten months after the US Supreme Court set aside a $399m (€340m) award against Samsung, whose devices include the Galaxy.

The three Apple patents covered design elements of the iPhone such as its black rectangular front face, rounded corners, and colourful grid of icons for programmes and apps.

Ms Koh's order is a setback for Apple, which called a retrial unnecessary and said the award should be confirmed.

Silicon Valley has closely followed the 6-1/2-year-old case.

Companies such as Facebook and Alphabet's Google have said an Apple win would encourage owners of design patents to sue for huge, unfair awards on products containing hundreds of features that are costly to develop.

The $399m represented profit from Samsung's sales of infringing smartphones, though the South Korean company has said it deserved reimbursement if it prevailed in the litigation.

It was part of a $548m payment that Samsung made to Apple in December 2015.

The legal dispute concerned whether the "article of manufacture" for which Samsung owed damages included its entire smartphones, or only parts that infringed Apple patents.

Without deciding that question, Justice Sonia Sotomayor wrote for the Supreme Court last 6 December that "the term 'article of manufacture' is broad enough to embrace both a product sold to a consumer and a component of that product".

In yesterday's order, Ms Koh said the jury instructions at the original 2012 trial inaccurately stated the law on that issue.

She said Samsung may have been prejudiced if jurors were prevented from considering whether any infringement covered "something other than the entire phone".

Apple contended that the jury instructions were "not erroneous," and said it had proved that Samsung applied its patented designs to its "entire phones".

Jurors initially awarded $1.05 billion to Apple, which was later reduced.

Samsung, in a statement, welcomed a new trial, calling it "a historic opportunity to determine how the US Supreme Court's guidance on design patent damages will be implemented".