Three prison guards indicted in a sex-for-contraband scandal that led to a deadly gunfight between another guard and federal agents were ordered held without bail, while two others were released until an August trial.

The five pleaded not guilty to conspiracy and appeared in court for bail hearings Thursday. A sixth guard charged in the scandal, 43-year-old Ralph Hill, died in the shootout Wednesday as federal agents arrived at the prison to arrest him.

U.S. Magistrate Judge William Sherrill said he decided to keep Alfred Barnes, Gregory Dixon and Alan Moore in custody because they could be flight risks, but he said the men, all military veterans who have been corrections officers for years, wouldn't be mixed in with the regular inmate population for their own protection.

Barnes "appeared more substantially involved" in the alleged scheme than his co-defendants, Sherrill said. And a prosecutor said Dixon and Moore tried to evade arrest after the shootings.

Dixon's lawyer, Timothy Jansen, said his client misunderstood orders from federal agents.

The five men and Hill were indicted Tuesday in an alleged scheme in which guards reportedly paid female inmates for sex with alcohol, food, money and marijuana over a two-year period. The guards also were accused of intimidating inmates and witnesses to ensure their silence.

On Wednesday, as FBI and Justice Department agents arrived at the Tallahassee Federal Correctional Institution to arrest the group, Hill opened fire, officials said. Justice Department special agent William "Buddy" Sentner and Hill died in the gunfight and a prison employee assisting with the arrest was wounded.

One former inmate of the prison complex, Ashley Turner, said Thursday that the sex-for-contraband scheme had been going on there for years and involved more than the six guards who were indicted.

"That list should probably be three times longer," said Turner, who was released in 2004 after serving slightly more than three years for bank fraud and now lives in Georgia. "These are just the ones who hung around long enough to get arrested."

Turner said that while she was there, guards coerced her to strip and touch herself sexually. She said other inmates would have sex with guards in exchange for cell phones, money and marijuana.

In court Thursday, the indicted guards' wives, parents and preachers came out to support them.

The families declined to comment afterward, but before the hearing started, one relative knelt in the courtroom, leaning her elbows on a bench to pray. Others broke into tears when Sherrill said he had decided to release guards Vincent Johnson and Lavon Spence until trial, tentatively set for Aug. 21.

The judge said he released Johnson in part because the guard claimed he helped the prison employee who was wounded during the gunfight Wednesday, and Lavon Spence partly because he claimed he was absent from work during most of the alleged scandal because of back surgeries.

A 2004 study of more than 2,700 correctional facilities for men and women found charges of sexual misconduct by employees had been made in all but one state prison surveyed by the federal Bureau of Justice Statistics. Similar accusations were made against employees at more than two of every five local jails.

"The bottom line is that women in correctional facilities should be guarded by women," said Alison Parker, acting director of the New York-based U.S. Human Rights Watch. "Men have been assigned to inappropriate tasks in inappropriate locations, for example: Male corrections officials guarding women where they take showers."