The U.S. Supreme Court told a lower court to take another look at a $399 million award won by Apple Inc. from rival Samsung Electronics Co. for copying the design of the iPhone.

The unanimous decision extends a legal battle that dates back to 2011 and at one point spanned the globe and engulfed every major maker of smartphones.

Writing for the court, Justice Sonia Sotomayor said Apple might not be entitled to Samsung’s entire profit on 11 infringing smartphones. She told a federal appeals court to consider whether Apple should be able to recoup profits attributable only to particular components. The high court stopped short of deciding that question itself.

Sotomayor said the lower court’s approach “cannot be squared with the text” of the federal patent statute.

Design patents, which cover the ornamental look of an object rather than any functional aspect, are increasingly used by tech companies and makers of consumer products to differentiate their products from competitors. The Supreme Court hadn’t considered design patents since disputes involving spoon handles in the 1870s and carpets in the 1890s.

The legal issues in the case narrowed after the high court accepted it in March. Apple said it accepted that in some cases the patent holder can collect only the profit attributable to a particular component, and not the earnings from the entire product.

Apple argued, however, that Samsung failed to show that the patented designs applied only to part of its phones. Samsung contended that it was Apple’s burden to show that the infringement gave Samsung any increased profits.

Google, Facebook Inc., EBay Inc. and Hewlett Packard Enterprise Co. said in filings that a victory for Apple would allow owners of design patents to extract unfair rewards on products that can have hundreds or even thousands of features.

A federal appeals court said Apple could collect Samsung’s entire profit.

Apple introduced the iPhone in 2007, revolutionizing an industry that before then had received limited interest from consumers. Apple said that Samsung simply copied the look of the iPhone to avoid a loss of market share.

The case is Samsung Electronics v. Apple, 15-777.