The Supreme Court has ruled that patent holders can’t sue people for reselling or refurbishing a product that’s based on those patents. Today, it passed down a decision in Impression Products v. Lexmark International, declaring that printer company Lexmark can’t sue companies selling refilled toner cartridges for patent infringement. This reverses a two-part federal court ruling from 2016, affirming that patent law doesn’t justify eroding ownership rights.

Lexmark International, like many companies that sell printers, makes a lot of its money from customers buying a steady stream of toner cartridges after their initial purchase. But “remanufacturing” companies like Impression Products can take exhausted cartridges, refill them, and independently sell them at lower costs. Lexmark has spent over a decade arguing that this kind of refurbishing violates both copyright and patent law — though it lost the copyright fight in 2004.

This is the second big legal loss for Lexmark

Today’s ruling covers two separate arguments involving refilled cartridges. The first involves discounted “Return Program” cartridges, which Lexmark sells with a contractual restriction on reselling. The second involves any internationally sold cartridge that was refilled and imported into the US. In the first case, Lexmark argued that its contract with buyers includes a right to sue for patent infringement, which last year’s federal court decision upheld. In the second, it claimed that while selling an item inside the US might “exhaust” a company’s domestic patent rights, it retained those domestic rights if the same product were sold abroad. The federal court also agreed with this reasoning.

But the Supreme Court unanimously rejected the claim involving refurbished cartridges. Essentially, the court determined that when a patent holder sells a product, they can’t use patent law to control how the buyer uses it, no matter what kind of agreement the two parties sign. So if a buyer breaks a promise not to resell a toner cartridge, Lexmark can sue for breaking the contract, but not for patent infringement.

The court also decided that cartridges sold abroad shouldn’t be treated differently from ones sold domestically, as long as Lexmark itself had been involved in the initial sale. It drew on a similar decision allowing the import of copyrighted works, applying the same standards to patents. This is potentially a blow not just to Lexmark, but to companies that sell patented drugs or medical devices cheaper abroad than in the US, although Bloomberg notes that people may be more leery of buying those from resellers.

Overall, as the EFF writes in a statement, these decisions support the idea that intellectual property rights “should not be a hunting license that allows an owner to control and destroy any business that threatens their profits.” Companies can draw up contracts to control how their products are used — but they can’t expand the scope of patent law to do so.