He used an illustration to make the point.

“Take a shop that restores and sells used cars,” Chief Justice Roberts wrote. “The business works because the shop can rest assured that, so long as those bringing in the cars own them, the shop is free to repair and resell those vehicles. That smooth flow of commerce would sputter if companies that make the thousands of parts that go into a vehicle could keep their patent rights after the first sale.”

Printer makers like Lexmark and HP have long battled independent companies that refill ink and toner cartridges and sell them more cheaply than the manufacturers do. Inkjet printer ink is one of the world’s most expensive liquids, with Consumer Reports magazine estimating in 2013 that it cost $13 to $75 an ounce — more than top-class Champagne and many perfumes. A new Lexmark toner cartridge, with a suggested price of almost $200, sells for $138 at a major retailer. But a refurbisher currently sells a replacement for $72.

While Lexmark turned to the courts to stop the refill companies, HP resorted to technology, such as changing the internal software in the printers to recognize and block the use of unauthorized cartridges.

But the court’s decision will have ramifications far beyond ink, particularly for the import and resale of products like smartphones and name-brand drugs.

The justices essentially ruled that once products are sold, buyers can do what they want with them unless other laws intervene. In theory, the decision will allow a retailer like Costco Wholesale, which filed a brief for the defendant in the case, to buy high-tech goods at the cheapest price it can find worldwide, bring them to the United States and resell them to customers.

In a brief supporting Impression Products, Intel and other technology companies told the court that patent law should not be used to undermine an interconnected global economy. “A product may be designed in the United States; assembled in Singapore from parts made in Costa Rica, Israel and China; and then shipped to the United States for sale,” the brief said. “Intel’s multitier supply chain, for example, comprises more than 16,000 suppliers in over 100 countries. Likewise, more than 750 companies supply components from over 30 countries that are incorporated in iPhones and iPads.”

The appeals court had also ruled in favor of Lexmark on foreign sales, saying that patent holders could control what was done with their products after they were sold abroad and re-imported by buyers.