A Victorian prisoner repeatedly warned authorities not to free him and threatened to go on a killing spree if released so he could return to jail.
Ali Jalal last year told his psychologist he'd commit an extreme act of violence if let out. He later told a corrections staffer it was up to the judge to take a risk and gamble with an innocent person's life.
Letters were found in the Iraqi-born man's cell addressed to counter-terror police.
Jalal wrote "white power", "death to all Muslims", and said he was inspired by the SAS and Christchurch gunman.
In a separate intercepted letter, Jalal said he was an angry man with extreme views.
The 34-year-old has personality disorders and is effectively institutionalised after spending eight years in custody since 2013, Victoria's County Court was told on Wednesday.
His sentence for robbery expired in 2019.
He repeatedly told Victoria Police, Corrections Victoria and his psychologist he'd target "any random person" or someone "who looked at him funny" if let out so he could be imprisoned again.
"If you let me out, I'm going to kill a lot of people," Jalal said.
"I'll f***ing murder every single one of them."
He pleaded guilty to five counts of making threats to kill and one count of threatening to inflicting serious injury for the comments made between October 2020 and April this year.
They included Jalal saying he'd "manipulate the f***" out of the judge and corrections staff and there'd be a public inquiry about why he was let out.
Appearing in court via video link, Jalal said "all this started when I was denied access to religious materials".
"I'm in a toxic cycle in prison," he also told Judge Duncan Allen.
"My only human interactions are with officers who pat me down and strip search me."
Judge Allen said it appeared Jalal had become institutionalised and was frightened about how he'd cope in the community.
"These letters, these threats ... they're effectively 'I'm saying these things to convince you, you have to keep me locked up'," the judge said.
Acting for Jalal, barrister Rishi Nathwani said the man did not intend to do any of the things he threatened, but was trying to get what he wanted from authorities.
This behaviour was linked to Jalal's under-privileged background, which caused his personality disorders, Mr Nathwani said.
Jalal was classified as a serious violent offender and he'd inevitably serve more jail time, the court was told.
Corrections Victoria said it could not manage Jalal on a community order given his mental health needs, and the risk he posed to staff and the public.
He previously admitted using a postal service to harass in a 2019 letter sent to Prime Minister Scott Morrison.
Jalal is due to return to court for a further pre-sentence hearing on June 22.
Lifeline 13 11 14
beyondblue 1300 22 4636
Australian Associated Press