WASHINGTON — The Supreme Court on Tuesday placed sharp limits on how much control patent holders have over how their products are used after they are sold.

The case concerned Lexmark International, which makes toner cartridges for use in its printers. The court ruled that the company could not use patent law to stop companies from refilling and selling the cartridges.

Lexmark sold the cartridges on the condition that they not be reused after the ink ran out. Impression Products, a small company in Charleston, West Virginia, nonetheless bought Lexmark cartridges in the United States and abroad, refurbished and refilled them and sold them more cheaply than Lexmark does.

Lexmark sued for patent infringement, and the U.S. Court of Appeals for the Federal Circuit, a specialized court in Washington, accepted both of its main arguments, one concerning domestic sales and the other concerning international ones.

The appeals court acknowledged that the general rule was that buyers of patented products could do with them what they wished. But it said the conditions Lexmark placed on the sale of its cartridges could be enforced as a matter of patent law for sales in the United States.

Chief Justice John Roberts Jr., writing for a unanimous Supreme Court on this point, said Lexmark could not use the patent laws to enforce the contractual conditions it placed on the sale of its cartridges. Under the doctrine of “patent exhaustion,” he wrote, once a patent holder sells an item, it can no longer control the item through the patent laws.

“The purchaser and all subsequent owners are free to use or resell the product just like any other item of personal property, without fear of an infringement lawsuit,” the chief justice wrote.

He used an illustration to make the point.

“Take a shop that restores and sells used cars,” 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.”

The appeals court had 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.

Roberts disagreed, writing for the majority that the same basic principles applied. “An authorized sale outside the United States, just as one within the United States, exhausts all rights under the Patent Act,” he wrote.

In a 2013 Supreme Court copyright decision, Kirtsaeng v. John Wiley & Sons, the Supreme Court ruled that it was lawful to import and resell textbooks that were first sold abroad. Roberts wrote that making distinctions between patent and copyright protections “would make little theoretical or practical sense.”

The ruling on international sales is significant, legal experts said, because companies often sell their products abroad at lower prices on the condition that they will not be imported into the United States.

Justice Ruth Bader Ginsburg dissented from that part of the decision. “Patent law is territorial,” she wrote. “A foreign sale, I would hold, does not exhaust a U.S. inventor’s U.S. patent rights.”

Justice Neil M. Gorsuch did not participate in the case, Impression Products v. Lexmark International, No. 15-1189.