WASHINGTON — The Supreme Court on Tuesday ruled for Samsung in its patent dispute with Apple and set aside a $400 million damages verdict for copying the look of the iPhone.

The justices dealt only with the question of how much the South Korean firm should pay for copying several design features of Apple's smartphone.

A jury had found that Samsung copied several features of Apple's patented design, and a judge said the South Korean firm should pay out its "entire profit" from the sale of its smartphones.

Those damages of $399 million were upheld by a federal appeals court, but they were set aside by the high court in an 8-0 decision Tuesday.

In a brief opinion, the justices said the design features of the smartphones, including their rectangular shape, were a "component" of the product, not the entire product. Therefore Samsung should be forced to pay a lesser amount for copying the look of Apple's iPhone, the court found.

But the high court did not decide on the proper amount. Instead, the justices sent the case back to an appeals court to decide on how much the design features contributed to the value of the iPhone.