The California Supreme Court on Thursday delivered a significant victory to lawyers fighting malicious-prosecution claims, ruling that defeating summary judgment in the underlying case bars future claims that they knowingly pursued meritless lawsuits.

The ruling means that Latham & Watkins and one of its partners, Daniel Schechter, are off the hook for potential liability in a malicious-prosecution case—even though a trial judge found in 2008 that the firm acted in bad faith when it litigated a trade secrets suit against two former employees of an infrared-camera manufacturer, FLIR Systems Inc.