GREAT FALLS, Mont. (AP) — A state hearings officer has upheld a ruling that Blaine and Hill counties showed discriminatory indifference toward an 18-year-old inmate in the Hill County Detention Center who died in 2009 of acute alcohol withdrawal.

The order by Department of Labor hearing officer Terry Spear says the two counties are liable for $300,000 for A.J. Longsoldier's emotional distress before he died.

The Associated Press reports counties also must train their deputies to ensure medications and prescriptions are obtained and administered.

The order upholds a ruling by the Montana Human Rights Commission, which said in September Longsoldier was discriminated against based on his alcoholism, which was determined to be a disability.

Longsoldier died from delirium tremens, or alcohol withdrawal, days after his arrest on a contempt of court charge.