SANTA ANA (CBSLA) — The Orange County Superior Court Friday ordered Sheriff Don Barnes to reduce jail populations by 50% in an effort to prevent further spread of COVID-19.

“We are evaluating the order, its impacts and our options for appeal,” Barnes said in a statement. “If the order stands, it will result in the release of more than 1,800 inmates.

READ MORE: Goldstein Investigates: Dozens Of Fire Safety Violations Reported at LAX

The decision was made in response to a lawsuit filed in April by the American Civil Liberties Union in an effort to “protect medically vulnerable people and people with disabilities detained at the Orange County Jail.”

The lawsuit alleged that all of those detained were at “imminent risk of serious illness or death from COVID-19.”

“The courts decision to alleviate the pressure on the jail by depopulating will help prevent the medical infrastructure — in the jail and in the surrounding community — from becoming totally overwhelmed,” Daisy Ramirez, jails conditions and policy coordinator at the ACLU SoCal, said. “This order recognizes that we must not forget the humanity of incarcerated people, and they should not be put in mortal danger.”

RELATED: Orange County Jail System Experiencing COVID-19 Outbreak

READ MORE: CHP Reports 2 More Possible Shooting Incidents On 91 Freeway In Corona

In the order, Judge Peter Wilson wrote that Barnes’ “deliberate indifference to the substantial risk of serious harm from COVID-19 infection to … medically vulnerable people in [his] custody violates their rights.”

The judge also found that Barnes “abused his discretion in failing to exercise his clear and present duty … to consider for release petitioners and all other incarcerated people who are medically vulnerable to COVID-19, whose lives are endangered by the COVID-19 emergency.”

Due to those findings, the judge ordered Barnes to expedite the removal of the number of inmates necessary to reduce the jail’s population in all congregate living areas by 50% in an effort to achieve proper social distancing and to mandate the use of face masks for all staff at any time they are within six feet of an inmate.

“Many of these inmates are in pre-trial status for, or have been convicted of, violent crimes and will be released back into the community,” Barnes said. “This order puts our community at substantial risk and does not take into account the impact on the victims of these crimes.”

MORE NEWS: Caught On Camera: Woman Punches Would-Be Car Thief, Chases Him Down Corona Street

The ACLU and O.C. Sheriff’s Department were ordered to file a joint status report of compliance no later than Jan. 6.