Four former guards at a Kansas City jail have been sentenced to prison terms ranging from two years to nearly four years for beating a handcuffed inmate as a punishment.

The U.S. attorney’s office said in a news release that 30-year-old Travis Hewitt and 34-year-old Jen-I Pulos were sentenced Thursday, while 39-year-old Terrance Dooley and 27-year-old Dakota Pearce were sentenced last month.

The indictment alleges the four carried out a planned attack on an inmate in retaliation for his altercation with another officer.