A federal judge in San Francisco has found that an affiliate of UnitedHealthcare, the nation’s largest health insurer, breached its fiduciary duty to policyholders by following guidelines that emphasized cost-savings and addressing acute problems rather than treating underlying mental health and substance abuse issues.

U.S. Magistrate Judge Joseph Spero of the Northern District of California issued a 106-page ruling Tuesday finding that the guidelines that United Behavioral Health used when making coverage decisions in cases of mental illness and substance abuse didn’t provide for generally accepted standards of care outlined in the plaintiffs’ policies.