ATLANTA, GA - OCTOBER 05:  A podium with the logo for the Centers for Disease Control and Prevention  at the Tom Harkin Global Communications Center on October 5, 2014 in Atlanta, Georgia. The first confirmed Ebola virus patient in the United States was staying with family members at The Ivy Apartment complex before being treated at Texas Health Presbyterian Hospital Dallas. State and local officials are working with federal officials to monitor other individuals that had contact with the confirmed patient.  (Photo by Kevin C. Cox/Getty Images)
Kevin C. Cox/Getty Images North America/Getty Images
ATLANTA, GA - OCTOBER 05: A podium with the logo for the Centers for Disease Control and Prevention at the Tom Harkin Global Communications Center on October 5, 2014 in Atlanta, Georgia. The first confirmed Ebola virus patient in the United States was staying with family members at The Ivy Apartment complex before being treated at Texas Health Presbyterian Hospital Dallas. State and local officials are working with federal officials to monitor other individuals that had contact with the confirmed patient. (Photo by Kevin C. Cox/Getty Images)
Now playing
02:34
CDC: US life expectancy declined from 2016 to 2017
US Speaker of the House, Nancy Pelosi, Democrat of California, speaks at her weekly press briefing on Capitol Hill in Washington, DC, on July 22, 2021. (Photo by Brendan SMIALOWSKI / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
BRENDAN SMIALOWSKI/AFP/AFP via Getty Images
US Speaker of the House, Nancy Pelosi, Democrat of California, speaks at her weekly press briefing on Capitol Hill in Washington, DC, on July 22, 2021. (Photo by Brendan SMIALOWSKI / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
Now playing
01:21
Pelosi explains why she rejected GOP lawmakers from January 6 committee
Getty Images
Now playing
00:54
Nick Jonas injured during NBC Olympics special
Valerie Gordon
Now playing
00:59
Watch cattle flee as California wildfire rages
Fox News
Now playing
02:31
Tucker Carlson insults Capitol police officer
A boy receives a dose of the Pfizer/BioNTech Covid-19 vaccine at the Clalit Healthcare Services in the Israeli city of Holon near Tel Aviv on June 21, 2021, as Israel begins coronavirus vaccination campaign for 12 to 15-year-olds. - Israel is now urging more 12- to 15-year-olds to be vaccinated, citing new outbreaks attributed to the more infectious Delta variant. (Photo by JACK GUEZ / AFP) (Photo by JACK GUEZ/AFP via Getty Images)
JACK GUEZ/AFP/AFP via Getty Images
A boy receives a dose of the Pfizer/BioNTech Covid-19 vaccine at the Clalit Healthcare Services in the Israeli city of Holon near Tel Aviv on June 21, 2021, as Israel begins coronavirus vaccination campaign for 12 to 15-year-olds. - Israel is now urging more 12- to 15-year-olds to be vaccinated, citing new outbreaks attributed to the more infectious Delta variant. (Photo by JACK GUEZ / AFP) (Photo by JACK GUEZ/AFP via Getty Images)
Now playing
02:10
CDC warns of 'pandemic of the unvaccinated'
CNN
Now playing
02:06
'I feel worthless as a person': Hear why US Paralympian quit team
CNN
Now playing
02:55
See NYC mayor's message to unvaccinated healthcare workers
Justice Department
Now playing
01:37
Ex-Army Ranger weaponized military training during Capitol riot, judge says
TikTok/Erik Shoji/Kimberley Woods/Tilly Kearns
Now playing
01:55
This is what athletes are getting up to in the Olympic Village
jeff bezos blue origin space launch cooper intv sot vpx_00021804.png
jeff bezos blue origin space launch cooper intv sot vpx_00021804.png
Now playing
03:05
Jeff Bezos reveals most surprising part of space mission
President Joe Biden speaks about the nation's economic recovery amid the COVID-19 pandemic in the State Dining Room of the White House on July 19, 2021 in Washington, DC.
Drew Angerer/Getty Images
President Joe Biden speaks about the nation's economic recovery amid the COVID-19 pandemic in the State Dining Room of the White House on July 19, 2021 in Washington, DC.
Now playing
01:26
Biden backs off claim Facebook is 'killing people'
john kerry climate crisis speech royal botanical gardens kew intl ldn vpx_00003614.png
john kerry climate crisis speech royal botanical gardens kew intl ldn vpx_00003614.png
Now playing
05:45
Hear John Kerry's stark warning about our ongoing climate crisis
19 July 2021, Japan, Tokio: A man from Team Mexico walks past Olympic rings at the entrance to Olympic Village. The Olympic Village is a housing development that will house the participants of the 2020 Olympic Games. The 2020 Tokyo Olympics will be held from July 23, 2021 to Aug. 8, 2021. Photo by: Michael Kappeler/picture-alliance/dpa/AP Images
Michael Kappeler/picture-alliance/dpa/AP
19 July 2021, Japan, Tokio: A man from Team Mexico walks past Olympic rings at the entrance to Olympic Village. The Olympic Village is a housing development that will house the participants of the 2020 Olympic Games. The 2020 Tokyo Olympics will be held from July 23, 2021 to Aug. 8, 2021. Photo by: Michael Kappeler/picture-alliance/dpa/AP Images
Now playing
02:03
71 cases of Covid-19 linked to Olympic games in Tokyo
CNN
Now playing
02:37
'No one can convince me': Sharp divide remains over vaccines
Ben and Jerry's ice cream is stored in a cooler at an event where founders Jerry Greenfield and Ben Cohen gave away ice cream to bring attention to police reform at the U.S. Supreme Court on May 20, 2021 in Washington, DC. The two are urging the ending of police qualified immunity.
Kevin Dietsch/Getty Images
Ben and Jerry's ice cream is stored in a cooler at an event where founders Jerry Greenfield and Ben Cohen gave away ice cream to bring attention to police reform at the U.S. Supreme Court on May 20, 2021 in Washington, DC. The two are urging the ending of police qualified immunity.
Now playing
02:25
Ben & Jerry's will stop selling ice cream in Palestinian territories
CNN
Now playing
01:11
Jeff Bezos was criticized for his space flight. See what the billionaire had to say
CNN —  

In a scathing decision, a federal judge blasted a subsidiary of the nation’s largest insurance company for focusing on the “bottom line as much or more” than patients’ health, saying the insurer illegally denied treatment to thousands of people. The judge also slammed the company’s medical directors for being “deceptive” under oath.

US Chief Magistrate Judge Joseph Spero issued his decision Tuesday against United Behavioral Health, a unit of UnitedHealthcare, saying the insurer created internal policies that effectively discriminated against those seeking mental health and substance abuse treatment.

“It is well-established that effective treatment of mental health and substance use disorders includes treatment aimed at preventing relapse or deterioration of the patient’s condition and maintaining the patient’s level of functioning. UBH Guidelines deviate from that standard,” Spero said.

Legal observers called the decision one of the most important and most thorough rulings ever issued against an insurance company, at the federal level, on mental health issues.

Patrick Kennedy, the former US representative from Rhode Island who has long championed mental health issues, called the ruling “breathtaking” in its scope. For the mental health community, he equated it to the landmark 1954 Supreme Court decision that found racial segregation in public schools unconstitutional.

“This ruling is the Brown v. Board of Education for the mental health movement,” Kennedy said. “The insurance industry is hellbent on violating the federal law, and they’re doing so with impunity. Now, we have a federal court specifically and forensically breaking down how they get around the federal law.”

The class-action suit was brought on behalf of more than 50,000 people denied coverage by United Behavioral Health, the country’s largest managed behavioral health care organization.

Spero took more than a year to issue his 106-page decision. In addition to finding federal violations, Spero ruled that United Behavioral Health violated state laws in Illinois, Connecticut, Rhode Island and Texas.

The judge blasted United Behavioral Health’s medical directors and other expert witnesses who set the company’s policies – naming each one before shredding them as not credible and discounting their testimony.

“UBH’s experts, on the other hand, had serious credibility problems,” Spero wrote. “The Court found that with respect to a significant portion of their testimony each of them was evasive – and even deceptive – in their answers when confronted with contrary evidence.”

He said one board-certified psychiatrist and senior medical director, whose duties included supervising and training United Behavioral Health care advocacy clinicians, “was not always credible because in several instances he ignored the plain meaning of the words used in the Guidelines.”

Another United Behavioral Health expert whose duties included drafting coverage determination guidelines, the judge said, implemented a “model that keeps benefit expenses down by placing a heavy emphasis on crisis stabilization and an insufficient emphasis on the effective treatment of co-occurring and chronic conditions.”

The judge said such decisions had real impacts on patients because United Behavioral Health ignored “effective treatment of members’ underlying condition” and that “UBH knowingly and purposefully drafted its Guidelines to limit coverage to acute signs and symptoms.”

“Research has demonstrated that patients with mental health and substance use disorders who receive treatment at a lower level of care than is clinically appropriate face worse outcomes than those who are treated at the appropriate level of care,” Spero said in his ruling.

He concluded by saying one of the driving factors for such policy decisions was the company’s profit motivations: “Finally, the evidence at trial established that the emphasis on cost-cutting that was embedded in UBH’s Guideline development process actually tainted the process, causing UBH to make decisions about Guidelines based as much or more on its own bottom line as on the interests of the plan members.”

The ruling was issued in the US District Court for the Northern District of California. It will now move to a remedy phase in which the judge is to determine how the insurer should be punished.

Brian Hufford, one of the lead attorneys for the plaintiffs, said the case peeled back the layers of coverage decisions made by insurers that most policy holders don’t even know happen behind the scenes. He said the judge’s decision highlighted the fact United Behavioral Health was “making decisions that are influenced by their monetary concerns and what profits they can make.”

“This case involved coverage of benefits for the most vulnerable population – people who suffer from mental illness and substance abuse,” Hufford said. “Historically insurance companies have been able to hide that conduct and save money by denying treatment to these people in need.”

Meiram Bendat, an attorney and psychotherapist with the law firm Psych-Appeal who uncovered the guideline flaws, said the ruling was “vindication of what patients, providers, and the plaintiffs have been telling UBH for years – that the nation’s largest mental health insurer has been denying access to care on the false premise that ‘crisis’ should be the litmus test for coverage.”

UnitedHealthcare took issue with the judge’s comments about its medical directors, saying they “followed nationally accepted standards in reviewing these requests.”

“We look forward to demonstrating in the next phase of this case how our members received appropriate care,” UnitedHealthcare said in a written statement. “We remain committed to providing our members with access to the right care for the treatment of mental health conditions and substance use disorders.”

The National Alliance on Mental Illness, or NAMI, the nation’s largest advocacy group for the mentally ill, hailed the decision.

“This is a day NAMI has long awaited,” said Angela Kimball, NAMI’s national director of advocacy and public policy. “For decades, people with mental health conditions have experienced really horrific discrimination at the hands of health insurance plans. They routinely deny mental health care and often with tragic outcomes.”

She added, “This is absolutely an incredibly important decision.”

Speaking to CNN by phone, Kennedy called the judge’s ruling “scathing and breathtaking at the same time. I think, frankly, it can be used to understand how all the insurance companies are doing this.”

Get CNN Health's weekly newsletter

Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

“Given the fact United is the largest insurer in the country, this is a very disturbing decision, and it has implications for United that they really haven’t come to grips with.”

He said that the decision is made even more important because it comes at a time when life expectancy in America has been going down because of a “public health crisis in mental health and addiction.”

“The notion that the largest insurer in the nation is denying care for a set of illnesses that is the driving reason we have higher death rates in this country,” Kennedy said, “you can’t make this stuff up.”