Lawyer malpractice cases, usually handled in state courts, rarely find their way onto the docket of the U.S. Supreme Court.

But the high court on Wednesday took up a Texas legal malpractice case—not to decide if the lawyers involved really messed up, but rather to determine whether it should have been litigated before state court or federal court. The reason for the uncertainty is that the alleged malpractice occurred during a patent infringement case—and patent issues are the province of federal courts.

By the end of the hour-long argument, it appeared that federal courts might win out, with justices worrying that state court decisions could bring inconsistency to areas of federal law including not only patents but immigration and antitrust.

Justice Sonia Sotomayor voiced concern that a state court ruling on how Texas lawyers should or should not handle patent infringement cases could “change lawyers’ behaviors in federal court.” That, she said, “gives me pause, a lot of pause.” Chief Justice John Roberts Jr. echoed her concern, fretting that a state court malpractice ruling in this area “would be disruptive of the uniformity of federal patent law.”

The case of Gunn v. Minton was filed in state court by Vernon Minton, a software developer who claimed that his lawyers, including Jerry Gunn of Waco, mishandled a patent infringement suit they filed on his behalf against Nasdaq. Minton claimed that NASDAQ had infringed on his 2000 patent for stock-trading software.

The defendant lawyers denied wrongdoing, and while the case was pending, the U.S. Court of Appeals for the Federal Circuit ruled in a separate case that federal courts had exclusive jurisdiction over state legal malpractice claims when proving patent infringement is an element of the claim. The case was Air Measurement Technologies v. Akin Gump Strauss Hauer & Feld.

Based on that ruling and on a 2005 Supreme Court precedent, Grable & Sons Metal Products v. Darue Engineering and Manufacturing, the Texas Supreme Court ruled that federal courts had exclusive jurisdiction over Minton’s malpractice case. It invoked 28 U.S.C. 1338, which says no state court shall have jurisdiction over “any claim for relief arising under any Act of Congress relating to patents.” Gunn and the other defendants appealed to the Supreme Court.

The case is the latest in which the justices have struggled to decide just how broadly federal courts should predominate in cases “arising under” federal laws. The Grable test includes several factors, including how substantial the federal law issue is, and the balance between state and federal interests.

Under that test, lawyer Jane Webre, representing Jerry Gunn, told the court, the case should be handled in state court. Webre, appellate litigator at Scott, Douglass & McConnico in Austin, said the malpractice case did not raise significant federal issues, and any decision “would not be binding on either the PTO [U.S. Patent and Trademark Office] in a patent application, or on any subsequent federal court deciding a real patent case.”

She said that in the wake of the Federal Circuit ruling establishing federal predominance in patent-related malpractice cases, “scores and scores” of federal and state courts have been “grappling with this issue.”

Picking up on her point, Justice Anthony Kennedy said he worried that even if the Supreme Court resolves the legal malpractice issue, the question of federal vs. state court jurisdiction will be litigated on issues ranging from products liability to food and agriculture. “It goes on and on,” he said.

Thomas Michel of Griffith, Jay & Michel in Fort Worth rose to argue on behalf of Minton that federal courts should handle cases like his. A state court ruling, he insisted, would have a “profound effect on patent law” beyond his case. Patent lawyers are “going to have their backs watched by the state courts.”

Justices Elena Kagan and Antonin Scalia questioned whether in fact, state court rulings in patent-related case would really have such damaging impact or even would diverge much from federal court decisions, including by the Federal Circuit.

Scalia joked, “My experience is that…judges, including this federal judge, are not interested in getting into the weeds of patent law, and if they could rely on a decision of the Federal Circuit, they would do that just as fast as they can.”

This article originally appeared in The National Law Journal.