Three guards accused of beating an inmate at the Attica Correctional Facility so severely that doctors had to insert a plate and six pins into his leg each pleaded guilty on Monday to a single misdemeanor charge of misconduct. The last-minute plea deal spared them any jail time in exchange for quitting their jobs.

The resolution of the case came more than three years after corrections officers beat a 29-year-old inmate, George Williams, at the prison in western New York. He suffered two broken legs, broken ribs, a broken shoulder and a severe fracture of his eye socket, among other injuries.

“Let me be clear: This has never been about jail for these officers, even though they came dangerously close to that idea,” the Wyoming County district attorney, Donald O’Geen, said hours after the three guards were to have gone on trial on charges of gang assault, filing false reports and evidence tampering. Under the agreement, the officers can never again work in a New York State correctional institution.

“This prosecution has always been about holding these officers accountable for their abuse of power and to, once and for all, get them out of the corrections profession,” Mr. O’Geen added. He also said that Mr. Williams had “approved of the settlement” and “was overcome with emotion” upon being told of it by telephone on Monday.