A man who stabbed his wife more than 30 times after she told him she was having an affair with his friend and was leaving him has been sentenced to 20 years in prison.

Nitin Singh must serve 17 years of the sentence imposed Friday before he become eligible for parole. The 48-year-old Pennsville Township, New Jersey, man had pleaded guilty in August to aggravated manslaughter in a plea deal with Salem County prosecutors.

Authorities say the July 2016 stabbing of 42-year-old Seema Singh occurred in the couple's apartment while their three children slept nearby. The children were not injured.

Nitin Singh has said he attacked his wife after she said she was leaving him and would be taking all of his money and their children with her.