small business in West Virginia won a big victory in the Supreme Court on Tuesday. The court overwhelmingly sided with Impression Products in its patent dispute with printer giant Lexmark International, a case that tested whether a person or company (like, say, Impression Products) can purchase an article that’s already been sold once without fear of a lawsuit from the person or company (for instance, Lexmark) with a patent on that item. A win for Lexmark could have made life difficult for a vast number of businesses — big and small; manufacturers, wholesalers, and retailers; merchants of new goods and used — that trade in patented goods.

This case revolved around Lexmark’s efforts to block Impression Products from remanufacturing used toner cartridges and selling them at prices that undercut Lexmark’s new ones. Lexmark tried to do this by offering consumers a 20 percent discount for agreeing in advance not to reuse or resell the cartridge. Lexmark used a form of what’s commonly called a shrink-wrap license: the terms appear on the cartridge box itself, and the customer accepts these terms by opening the box.

And yet, many Lexmark customers, both in the US and abroad, cheerfully took the discount but ignored the terms, and the cartridges found their way, via wholesalers, to the remanufacturers. Rather than suing those consumers for breach of contract, Lexmark instead sued several remanufacturers for patent infringement. Most ended up settling — all except for Charleston-based Impression Products. This small company, which has 25 employees and sales approaching $15 million, argued that it had centuries of legal tradition on its side, in the principle of “patent exhaustion.” Patent exhaustion, also known as the “first-sale doctrine,” holds that the patentee makes his or her money on the first sale of the article, and after that, the buyer is free to do as he or she wishes with it.

A federal appeals court disagreed, and proposed instead that patent holders retain those rights after a US sale so long as these restrictions on use are “clearly communicated” and not otherwise illegal. And in foreign sales, the appeals court ruled that patent exhaustion does apply at all.

But on Tuesday, the Supreme Court rejected the appellate court’s thinking in the strongest possible terms. Writing for seven of the eight justices who heard the oral argument (Neil Gorsuch had yet to be confirmed), Chief Justice John Roberts declared of the toner cartridges originally marketed in the U.S., “Lexmark exhausted its patent rights in these cartridges the moment it sold them. The single-use/no-resale restrictions in Lexmark’s contracts with customers may have been clear and enforceable under contract law, but they do not entitle Lexmark to retain patent rights in an item that it has elected to sell.”

He even cited, as an example of the economic damage Lexmark’s legal theory might do, a hypothetical