(Reuters) - A New York state man pleaded guilty on Wednesday to taking part in a mass church beating that killed one of his teenage sons and injured another, a court spokeswoman said.

Bruce Leonard, 66, pleaded guilty in Utica County Court to first- and second-degree assault in the October 2015 attack in which his sons were pummeled for more than 10 hours with fists and whipped with an extension cord.

As part of the plea agreement, Leonard will testify against the seven other people accused in the case, the spokeswoman said. He will be sentenced on Sept. 9.

Leonard had been charged with murder, gang assault and kidnapping in the attack that killed Lucas Leonard, 19, and put another son, Christopher Leonard, 17, in the hospital.

The attack took place during a counseling session at the Word of Life Church in Chadwicks, a small town about 100 miles (160 km) west of Albany. Christopher Leonard said in a court hearing last year that he and his brother were assaulted because Lucas intended to leave the church.

The youths' mother, Deborah Leonard, pleaded guilty in December to assault charges in exchange for her testimony against the other defendants, including church pastor Tiffanie Irwin.

The trial of Sarah Ferguson, a half-sister of the victims who is accused of second-degree murder, manslaughter and other charges, will begin on Thursday, the spokeswoman said.

(Writing by Ian Simpson in Washington; Editing by Sandra Maler)