The U.S. Supreme Court in evening light. (Michael S. Williamson/The Washington Post)

A unanimous Supreme Court on Monday made it more difficult for companies to sue for patent infringement in courts that they consider friendly to their cause.

The justices affirmed a ­decades-old ruling that said such lawsuits should be filed in the judicial district where the alleged offender is incorporated. It reversed a ruling of the U.S. Court of Appeals for the Federal Circuit that gave plaintiffs greater leeway and resulted in a huge number of cases being filed in a receptive federal court in east Texas.

Justice Clarence Thomas, writing for the court, said that subsequent actions by Congress and other courts had not altered the Supreme Court’s 1957 decision that a lawsuit alleging patent infringement must be filed where the defendant “resides,” and a corporation resides only in its state of incorporation.

Under the Federal Circuit ruling, patent lawsuits can be filed wherever a company has even minimal sales of its products.

That has resulted in nearly half of the lawsuits being filed in the Eastern District of Texas in Marshall, where cases move quickly and the court is seen as sympathetic to plaintiffs.

One U.S. district judge, Rodney Gilstrap, received about one-quarter of all the patent cases initiated between 2014 to 2016 — more than were assigned to all federal judges in California, New York and Florida combined, according to Mark A. Lemley, a Stanford University law professor who filed the brief at the Supreme Court on behalf of himself and other professors.

The Supreme Court’s decision will represent a “seismic shift” and “deals a severe blow to non-practicing entities or ‘patent trolls,’ and shifts home court advantage to companies accused of patent infringement,” said Paul Cronin, an intellectual property specialist in Boston.

In the case before the court, an Indiana-based company, TC Heartland, was sued by Kraft Heinz. Kraft alleged that Heartland’s liquid water enhancers infringed on Kraft’s MiO liquid water enhancer. Kraft sued in Delaware, the judicial district with the second-highest number of patent lawsuits. Heartland was turned down by the courts when it attempted to get the case shifted to Indiana.

Because so many companies are incorporated in Delaware, analysts expect the number of lawsuits filed there to increase. But high-tech companies were among those that supported Heartland, and the number of cases filed in California is expected to rise as well.

The case is TC Heartland v. Kraft Foods Group Brands.