WAVERLY, Ohio (AP) — An Ohio man convicted of shooting five of eight family members killed in a 2016 massacre testified Monday he had no choice but to kill the mother of his child.

Jake Wagner pleaded guilty last year to shooting the five victims, an attack that investigators said resulted from a custody dispute between two families.

As part of his plea deal, Jake Wagner had agreed to testify against his older brother, George Wagner IV, in exchange for being spared the death penalty.

FILE – These undated file images released by the Ohio Attorney General’s office, show, top row from left, George “Billy” Wagner III and Angela Wagner, and bottom row from left, George Wagner IV and Edward “Jake” Wagner. The four members of the Wagner family were charged in the 2016 slayings of eight members of the Rhoden family in rural Ohio. Tony Rhoden Sr., a man who lost several relatives in the mass slaying, has filed a wrongful death lawsuit against the four suspects in the killings. (Ohio Attorney General’s office via AP, File)

George Wagner IV, whose trial has entered its eighth week in Pike County court, faces the death penalty if he’s convicted in the slayings of the Rhoden family near Piketon. George Wagner is the first person to go on trial for the killings.

Jake and George’s mother, Angela Wagner, also has pleaded guilty to helping plan the slayings, and is expected to testify. Jake and George’s father, George “Billy” Wagner III, has pleaded not guilty. He likely won’t go on trial until next year. The four members of the Wagner family were not arrested until more than two years after the slayings.

Special prosecutor Angela Canepa has not accused George Wagner, 31, of shooting anyone in April 2016, but she said he took part in planning, carrying out and covering up “one of the most heinous crimes in Ohio history.”

The two families had been close for years, but Canepa described the Wagners as being obsessed with gaining control over the child that Jake Wagner had with Hanna Rhoden.

The Wagner family had pressured Hanna Rhoden to sign away custody of the 3-year-old girl, but Hanna vowed in a Facebook message sent four months before the massacre that “they will have to kill me first,” Canepa has said.

Jake Wagner, who said he feared his daughter might suffer abuse, testified Monday that Hanna Rhoden’s comment was his “tipping point” when he decided Hanna, 19, had to die.

George Wagner was with his brother and his father when they drove to three separate locations where all eight victims were killed, went inside with the pair and helped his brother move two of the bodies, Canepa said previously.

Jake Wagner testified Monday that that was the tipping point that led him to conclude he had to kill Hanna, who was 19 at the time of her death. He said the other intended victims were Hanna’s brothers Frankie and Chris Rhoden and their father, Chris Rhoden Sr. The other four victims were killed because they could have been witnesses, Jake Wagner testified.

Jake Wagner also testified that George Wagner was supposed to kill Chris Rhoden Sr. but didn’t fire, so Jake Wagner shot Rhoden himself.

Defense attorney Richard Nash has said George Wagner is not like the rest of his family and had nothing to do with the killings.

The Wagners spent three months planning the massacre, buying masks, ammunition and a device to jam phone signals, Canepa said. The two brothers even dyed their hair in the week leading up to the killings, she said.

Several discoveries, Canepa said, led investigators to the Wagners including a shell casing found outside the Wagner’s home that matched one from a gun that killed five of the victims.

Those killed were 40-year-old Christopher Rhoden Sr.; his ex-wife, 37-year-old Dana Rhoden; their three children, 20-year-old Clarence “Frankie” Rhoden, 16-year-old Christopher Jr., and Hanna; Clarence Rhoden’s fiancee, 20-year-old Hannah Gilley; Christopher Rhoden Sr.’s brother, 44-year-old Kenneth Rhoden; and a cousin, 38-year-old Gary Rhoden.