Antonio Xavier Henry pleaded guilty to second-degree murder on Tuesday morning in the 2010 slaying of Rev. David Strong in Glenwood.
Prosecutor Neal Pinkston said the time will be served at 100 percent in state prison.
Henry, 28, got 20 years each on the murder count and especially aggravated robbery. The two terms will be served at the same time.
Also charged in the case is Brendan Barnes, who was a juvenile at the time of his arrest.
Henry appeared before Criminal Court Judge Don Poole with a large crowd of family members and former church members of Rev. Strong in the courtroom.
Prosecutor Pinkston said Henry was found driving Rev. Strong's silver PT Cruiser after his battered body was found at his residence on Glenwood Drive. He said Henry also used the minister's debit card at numerous banks and was caught on video doing so.
He said Henry admitted striking the victim and said he did so after the minister had sexual relations with him and Barnes.
The prosecutor said Barnes gave a somewhat different version.
Henry was represented by appointed attorney Dan Ripper, who earlier had a mental evaluation performed on Henry by Moccasin Bend Psychiatric Hospital that found that Henry was competent to assist his attorney with his legal defense.
Attorney Ripper, questioning the correctness of Moccasin Bend’s ruling, had sought a second mental evaluation of Henry, saying his client has a history of mental problems and is heavily medicated.
Both Henry and Barnes admitted that they beat the pastor, but both insist the other is responsible for the 29 stab wounds.
Judge Poole ruled earlier that the two defendants would be tried separately.