WARSAW, N.Y. (AP) — Three Attica prison guards charged with beating a jewelry thief until bones in his face and legs broke pleaded guilty Monday in an agreement that will spare them jail time.

Keith Swack, Sean Warner and Matthew Rademacher admitted to misdemeanor charges of official misconduct as jury selection was about to begin for their trial in Wyoming County Court.

The guards, who had been suspended without pay since after the 2011 attack, were given one-year conditional discharges and agreed to resign.

"This is the first time in New York state history that a correction officer has been prosecuted and pleaded guilty to committing an unauthorized violent act to an inmate while on duty," Wyoming County District Attorney Donald O'Geen said at a news conference.

The guards had been charged with felony gang assault and evidence tampering. Authorities said they severely beat then-29-year-old George Williams, who was serving time at the maximum security upstate New York prison for stealing jewelry from two Manhattan stores in 2008 and 2009.

"Their criminal actions and this type of behavior have absolutely no place within the department," state Corrections Commissioner Anthony Annucci said in a statement.

O'Geen said Williams had approved the settlement in advance and "was overcome with emotion" Monday upon hearing it had been finalized.

A statement from the union representing the guards said the case was trying for the officers, their families "and our membership, who have stood behind their fellow brothers throughout this ordeal."

"Although this matter has been resolved in court, our members continue to be assaulted at a record pace. It is our sincere hope that prosecutors will protect those who protect us by prosecuting these violent criminals who attack correction officers inside our prisons," said the statement from Mike Dildine, a vice president of the New York State Correctional Officers & Police Benevolent Association.

Annucci indicated he would, during next year's contract negotiations, seek changes to the way staff are disciplined for "egregious acts of misconduct."

O'Geen, too, cited the need for reforms, including in the arbitration process. He said video cameras in areas where inmates are moved from one location to another also would have helped resolve the case more quickly.