(Reuters) - Alabama, one of two U.S. states that segregate inmates with HIV from the rest of their prison population, will seek to defend the policy against a class action lawsuit headed to trial in federal court on Monday.

The American Civil Liberties Union sued Alabama in 2011 for what the group contends is a discriminatory practice that prevents most HIV-positive inmates from participating in rehabilitation and retraining programs important for their success after prison.

The state says the civil liberties group has failed to prove that there would be no significant risk of the infection being transmitted to other prisoners if inmates with HIV were fully integrated, according to court documents.

An appeals court upheld the segregated housing policy in 1999, but ACLU attorney Margaret Winter said advances in treatment for HIV infection warranted the court taking another look at the practice.

"It is based on an uneducated view on HIV and how it is transmitted, which really goes back to the dark ages of when it first started and there was hysteria," she said.

South Carolina is the only other U.S. state that houses inmates with HIV away from other prisoners. Mississippi ceased a similar practice in March 2010 and has since integrated inmates with the infection, Winter said.

Two of Alabama's 29 prisons have dormitories set aside specifically for prisoners with HIV. A handful of prisoners have been allowed to live and work in non-segregated settings in two work-release programs, Winter said.

Approximately 270 inmates out of the 26,400 in the state prison system have tested positive for the virus and none has developed AIDS, according to Alabama Department of Corrections spokesman Brian Corbett.

The inmates with HIV live, eat and have their recreation time apart from the general population, according to court documents filed by the ACLU. Male inmates in the HIV dormitories are given white arm bands that signal their medical status and are to be worn at all times, the group said.

One HIV-positive prisoner received 21 disciplinary days and lost six months of good-behavior time off his sentence for sitting in the general population cafeteria, according to court documents.

"First, we are isolated ... like we are contagious animals," Dana Harley, another prisoner who is a plaintiff in the case, said in a letter included in the court file. "It is like punishment three times over."

Restricting inmates with HIV from programs such as prison jobs and work release "could harm their reentry into society," Winter said.

At the trial, expected to last one month in Montgomery, Alabama, the ACLU will argue that Alabama's policy violates the Americans with Disabilities Act. The state of Alabama contends that HIV does not qualify as an impairment under federal law.

(Editing by Colleen Jenkins and David Brunnstrom)