SAN FRANCISCO (CBS SF / AP) — California prison inmates cannot hold state officials liable for contracting an airborne fungus that was more prevalent in the prison system, the San Francisco-based 9th U.S. Circuit Court of Appeals said Friday in a decision throwing out the inmates’ lawsuits.

A federal monitor, not California officials, managed the state prison system’s response to Valley Fever, and state officials could have reasonably concluded that the threat to inmates from the disease was not that grave, a three-judge panel of the court ruled unanimously.

That’s because Valley Fever occurs throughout California’s Central Valley and elsewhere in the southwestern U.S., where millions of people live, the panel said.

Ian Wallach, an attorney for some of the inmates, said the ruling was devastating.

“The families of over 40 inmates who died and 100 who got infected and require lifetime medical care are left to fend for themselves,” he said.

Valley Fever is a fungal infection that originates in the soil. It is not contagious, and about half of the infections produce no symptoms. In a few cases, the infection can spread from the lungs to the brain, bones, skin or eyes, causing blindness, skin abscesses, lung failure and occasionally death.

State prison officials were under the watch of a federal monitor assigned to oversee health care for inmates when they began in November 2007 to exclude and move prisoners susceptible to death from the fungus from Central Valley prisons, according to the 9th Circuit.

The monitor later changed the policy to exclude black and Filipino inmates from Avenal and Pleasant Valley state prisons. The two groups are more likely to develop the fatal condition.

The state had to move thousands of inmates out of the facilities.

Wallach said state prison officials acted too late and didn’t do enough. The lawsuits accused prison officials of violating the inmates’ 8th Amendment right against cruel and unusual punishment by exposing them to an increased risk of Valley Fever.

Some plaintiffs also argued that officials discriminated against African American inmates by failing to exclude them from the prisons until 2013.

The 9th Circuit panel threw that claim out as well.

“We are sympathetic to the inmates’ plight,” Judge Andrew Kleinfeld wrote. “But it would not have been ‘obvious’ to any reasonable official that they had to segregate prisoners by race or do more than the federal Receiver told them to do.”

© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.