The Harlem man who helped Woodmere motivational speaker Jeffrey Locker kill himself pleaded guilty Monday to first-degree manslaughter as part of a plea deal that calls for a 12-year prison sentence.

Ex-con Kenneth Minor, 41, was convicted of murder in 2011 and sentenced to 20 years for the 2009 stabbing death of Locker in a bizarre suicide-for-hire plot, but the conviction was reversed over improper jury instructions on the defense of assisted suicide.

Minor already has served more than 5 years in prison. He is scheduled to be sentenced in State Supreme Court in Manhattan on Oct. 20.

Locker's bloody body was found in his car in Harlem in July 2009. Testimony at trial showed he was in debt, acquired $12 million in life insurance for his family and hired Minor to help kill him. Minor claimed he held a knife and Locker thrust his body on it.

The plea followed extended legal wrangling. Minor's defense team says he was guilty only of aiding suicide, second-degree manslaughter in New York. Prosecutors wanted to try him for both murder and second-degree manslaughter, giving jurors a choice.

The defense said it was improper to combine his old murder indictment, obtained before cops realized that Locker had set it up, with a new second-degree manslaughter charge. But when the judge sided with prosecutors, Minor agreed to a compromise plea and avoided risking a murder conviction.

"He wants this to be over," defense lawyer Dan Gotlin said. The deal, Gotlin said, still allows Minor to appeal, and he'll be allowed to plead to second-degree manslaughter if an appeals court knocks out the murder charge.