John Westland was told today he must spend a minimum of 19 years behind bars for the murder of Liam Deane.
Westland, 29, is a convicted rapist serving an indefinite sentence for a violent sex attack on a 53-year-old woman when he was a teenager.
Deane, 22, was serving a life sentence for the murder of his two-day old baby daughter.
The pair had been cellmates for just five weeks when Westland stabbed and strangled Deane as he lay "incapacitated" on his bunk after taking the drug spice.
After the killing Westland told police: "I murdered him because he is a sex offender"
Sentencing Westland, judge Rodney Jameson, QC, said: "You told the jury that you believed that Liam Deane was a sex offender. He was not.
"He had committed a very serious crime but he had admitted it from the first and was trying to come to terms with what he had done.
"It is an unfortunate part of prison life that those themselves guilty of very serious crimes, as you were, try to find another inmate they can look down on.
"Being suspected of a sexual offence was, in your view, reason enough to choose Liam Deane for that role.
"Given the nature of your offences, others might find that as rank hypocrisy."
Judge Jameson said it was unclear whether Westland killed Deane 'for his own satisfaction', to 'curry favour with others' or on the orders of other inmates.
He added: "It is a necessary part of civilised society that those convicted of crimes, even of murder, can do so in safety."
Westland was told he will only be released from custody if he is no longer considered a danger to the public after serving his minimum term.
The court heard Westland has had applications for release refused from the parole board on three previous occasions because of the danger he poses.
Deane was found dead by prison officers on the top bunk of his cell after Westland pressed an emergency buzzer on November 12 last year.
He suffered three serious stab wounds to his head and neck.
There was also evidence that Deane had been asphyxiated and strangled.
Westland denied responsibility for causing the injuries when he gave evidence at the trial.
The defendant said Deane was being bullied at the prison and had received death threats from other inmates.