A sexual abuse investigation preceded the alleged killing of a Wyoming County man last month.

Retired sheriff’s deputy, 60-year-old Joseph Mlyniec, appeared in Wyoming County Court Wednesday where he pleaded not guilty to two felony charges, including second-degree murder.

Prosecutors detailed in a 20-page court document why they say Joseph Mlyniec had motive to shoot Robert Irvine III in the Town of Perry on March 7.

According to that court paperwork, Irvine was a witness to a sexual abuse investigation centered on the retired deputy and had recently threatened to come forward in the investigation if Mlyniec didn’t turn himself in.

Prosecutors say Mlyniec would lure troubled young men to his Perry farmhouse where he would groom them to perform sexual favors in exchange for money and/or food. 

Police say Mlyniec shot Irvine in the head, neck, chest and leg. He's being held in the Wyoming County Jail without bail.