The Supreme Court on Monday slapped limits on where injury lawsuits may be filed for the second time in three weeks, again siding with businesses that want to prevent plaintiffs from “shopping” for friendly courts for their cases.

In an 8-1 ruling, the justices overturned a lower court’s decision that had allowed hundreds of out-of-state patients who took Bristol-Myers Squibb Co’s blood-thinning medication Plavix to sue the company in California.

State courts cannot hear claims against companies that are not based in the state when the alleged injuries did not occur there, the justices ruled.

The ruling had an immediate impact, with a state court in St. Louis citing it in declaring a mistrial in a lawsuit filed by out-of-state plaintiffs against New Jersey-based Johnson & Johnson over its talc-related products, plaintiffs lawyer Ted Meadows said on Monday.

Previous talc cases in the same court have produced jury awards of over $300 million against J&J. Meadows said he was disappointed, but thought there were still ways to establish jurisdiction in St. Louis.

The Supreme Court on May 30 reached a similar conclusion in a separate case involving out-of-state injury claims against Texas-based BNSF Railway Co.

Companies typically can be sued in a state where they are headquartered or incorporated, as well as where they have important ties. Businesses want to limit the ability of plaintiffs to shop for courts in states with laws conducive to such injury lawsuits.

Plaintiffs contend that corporations are seeking to squeeze their access to compensation for injuries by denying them their day in state courts.

The underlying lawsuits filed in 2012 against Bristol-Myers and California-based drug distributor McKesson Corp involved 86 California residents and 575 non-Californians, alleging Plavix increased their risk of stroke, heart attack and internal bleeding.

Bristol-Myers argued it should not face claims in California by plaintiffs who do not live in the state. The company is incorporated in Delaware and headquartered in New York.

The California Supreme Court ruled in August 2016 that it could preside over the case because Bristol-Myers conducted a national marketing campaign and sold nearly $1 billion of the drug in the state.

Writing for the U.S. Supreme Court majority on Monday, Justice Samuel Alito said the California court was wrong to rule that it could hear the case “without identifying any adequate link between the state and the nonresidents’ claim.”

In a dissenting opinion, Justice Sonia Sotomayor predicted that the Supreme Court’s ruling will make it harder to consolidate lawsuits against corporations in state courts and lead to unfairness for individual injury plaintiffs. (Additional reporting by Nate Raymond.)