Now playing: Watch this: Samsung wins in Supreme Court battle against Apple

The US Supreme Court on Tuesday handed Samsung a victory in its long-running patent dispute with Apple.

The nation's highest court said in a unanimous opinion that damages for design patent infringement can be based only on the part of the device that infringed the patents, not necessarily on the entire product.

The ruling reshapes the value of designs, and how much one company has to pay for copying the look of a competitor's product. Current law said an award could be collected on the entire profits of an infringing device. In this case, that's the $399 million Samsung paid Apple late last year. This decision means that amount will likely go down.

Justice Sonia Sotomayor wrote in the opinion for the court that the only question resolved today "is whether, in the case of a multicomponent product, the relevant 'article of manufacture' must always be the end product sold to the consumer or whether it can also be a component of that product."

The court concluded the relevant article of manufacture "need not be the end product sold to the consumer but may be only a component of that product."

The Supreme Court didn't, however, say how damages should be determined.

The case will go back to lower courts for the damages to be reexamined.

"The question before the Supreme Court was how to calculate the amount Samsung should pay for their copying," Apple said in a statement. "Our case has always been about Samsung's blatant copying of our ideas, and that was never in dispute. We will continue to protect the years of hard work that has made iPhone the world's most innovative and beloved product. We remain optimistic that the lower courts will again send a powerful signal that stealing isn't right."

Samsung applauded the ruling as a victory for innovation and competition.

"The US Supreme Court's landmark decision today is a victory for Samsung and for all those who promote creativity, innovation and fair competition in the marketplace," Samsung said in a statement. "We thank our supporters from the world's leading technology companies, the 50 intellectual property professors, and the many public policy groups who stood with us as we fought for a legal environment that fairly rewards invention and fosters innovation."

The ruling -- the first time the Supreme Court has considered a design case since the 1800s -- could have ripple effects across the tech industry. Companies such as Google, Facebook and others supported Samsung, saying being allowed to collect damages on an entire device would stifle innovation.

"This was a pivotal court case for the technology industry and it is encouraging to see the law interpreted and applied in a way that makes sense in a modern era and protects both inventors and innovation," Ed Black, CEO of the Computer & Communications Industry Association, said in a statement.

Apple argued that a Samsung win would weaken the protections afforded to new creations.

The original Apple v. Samsung trial in 2012 captivated Silicon Valley and the tech industry because it exposed the inner workings of two notoriously secretive companies. It was just one of many cases around the world as the rivals sparred both in the marketplace and in the courtroom. Notably, the devices in question haven't been on the market in years.

The Supreme Court heard arguments in the case in mid-October. The justices' opinion came back quicker than expected by legal experts. Most anticipated the ruling in early 2017.

Updated at 11:26 a.m. PT: To include a comment from a tech industry trade group.

Updated at 3:05 p.. PT: To include Apple's comment.

Updated at 5:20 p.m. PT: To include Samsung's statement.