READ MORE:
• Sex with woman consensual, Heke-Gray tells jury
• Facebook rape case: Whangārei court jury told they will hear terrible details
• Wanted man Jessie Heke-Gray gives himself up after police surround house in Northland
• Police seek Jesse Heke-Gray
He was found guilty on five charges of unlawful sexual connection with a female, three charges of threatening to kill, and single charges of rape, assault with intent to injure, unlawfully carrying a firearm and perverting the course of justice.
Details in the sentencing notes of Justice Whata described Heke-Gray as having experienced a traumatic upbringing.
For most of Heke-Gray's childhood, his father was in jail for serious violent offending. His mother was also absent during a prison sentence for possession of heroin.
In the rare instances they were out at the same time, Heke-Gray witnessed his father physically abusing his mother.
At the age of 8 he was taken into the care of his paternal grandmother. By the age of 13 or 14, he was in state care.
Justice Whata said Heke-Gray was kicked out of several homes and schools, started smoking methamphetamine at the age of 17 and was a member of the "South Side Crips".
Clinical psychologist Jim van Rensberg said from an early age Heke-Gray developed a sense of hostility towards women, who he degraded and objectified.
"Regrettably, I have come to the view that given what appears to be an entrenched denial of your offending, I consider I am obliged to impose a sentence of preventive detention," the judge said.
The case was transferred to the High Court after the Crown sought preventive detention.
Heke-Gray's defence at trial was that the woman, who travelled from Wellington to Whangārei, consented to all sexual activity in lieu of a debt she owed him.
But a jury found he had sexually assaulted the woman in a toilet cubicle and in a hotel room in Whangārei. On one occasion, he placed a pistol in her mouth and to the back of her throat and told her: "If you ever cross me or if you ever dob me in to the police, I will blow the back of your head off."
She was tattooed with his nickname above her eyebrow and Heke-Gray said if she ever left him or did anything, he would cut the tattoo out with a machete.
The woman managed to escape after visiting a sexual health clinic.
Safe and Effective Justice Group chairman Chester Burrows said a person's upbringing shaped his teenage and adult life.
He said Corrections had treated maximum security prisoners poorly by providing limited opportunities for rehabilitation which, in part, explained why they kept going back to prison.
"That is not to excuse their behaviour but to understand it. There's got to be a lot more effort put into them and it's got to be done in a precise and calculated way," Burrows said.
The group's second report recommending changes to our criminal justice system is to be released shortly.
A minimum non-parole of seven years and six months was imposed on Heke-Gray.
He was also given a three-strikes warning.