A prisoner who made threats to kill people and have sex with their corpses has been jailed for 45 years.
Richard Ford, 38, wrote in letters from his cell that he would kill a total of 10 people - including a judge, police officers and prison staff - once he was released from Nottingham Prison.
Judge Michael Heath imposed five consecutive nine year jail terms with a further five sentences of nine years to run concurrently.
He told Ford the "controversial" lengthy sentence was the only way he could protect the public.
Ford, who has spent most of the last 14 years in jail, was being held at HMP Nottingham last January when he passed a series of notes to prison officers that contained the threats.
He named several prison officers, a fellow inmate, a district judge, a police officer and a former partner.
Judge Heath said the case had caused him "very considerable anxiety".