SAN FRANCISCO (AP) – A federal appeals court has upheld a law that bars people who are in the country illegally from avoiding deportation if they are habitual drunks.

A divided 11-judge panel of the 9th U.S. Circuit Court of Appeals on Tuesday said Congress may have reasonably concluded that people who regularly drink alcohol to excess pose a greater risk to themselves and others. The law considers regular drunks not to have good moral character.

READ MORE: Suspect Arrested In Fatal Shooting On Tracy Ranch

The ruling overturned a decision by a smaller 9th Circuit panel that ruled that alcoholism is an illness, not a moral defect.

READ MORE: In Wake Of Sacramento Teen Shootings, Police Gang Units Arrest 4, Seize Guns, Illegal Drugs

The decision came in the case of Salomon Ledezma-Cosino, who faced deportation after his arrest in California in 2008 on suspicion of driving under the influence.

His attorney, Kelsi Corkran, said the ruling further stigmatizes alcoholism.

MORE NEWS: 'The Mighty Ducks' Star Who Was Arrested In Marysville Celebrates 2 Years Sober With Striking Photos

Copyright 2017 The Associated Press.