Stephen Mark Gotty has 143 prior convictions dating back to 1976, including rape and sexual assault.

GRAPHIC WARNING: A repeat sexual offender who violated his teenage cellmate in prison will stay behind bars indefinitely, following a sentence of preventive detention.

Stephen Mark Gotty forced the 19-year-old to engage in oral sex, telling him he was "his b.... now".

The 57-year-old was sentenced on two charges of sexual violation at the High Court in Auckland on Thursday.

Justice Matthew Downs said a finite sentence "would not provide sufficient protection" for the community, especially given that by some measures Gotty's offending appeared to be getting worse.

READ MORE:

* Crown seeks preventive detention for prisoner who forced teenage cellmate into oral sex

* Transgender woman alleges rape in men's prison

* Double-bunking arrangements for trans prisoners are under review

* Serco staff left Mt Eden prisoner bleeding on floor

Justice Downs said the sexual violation had left Gotty's victim with anxiety, and on medication to treat his mental health.

"He [the teenager]feels ashamed of what happened, even though he did nothing wrong," he said.

Gotty has 143 prior convictions dating back to when he was a teen himself in 1976.

He raped a teenage girl for two hours in 1996, and was more recently convicted for sexually assaulting a transgender male, also a teenager.

Gotty hung his head in court as the judge described the details of his sexual offending.

Justice Downs acknowledged Gotty had "witnessed and experienced extreme violence and sexual abuse" in his childhood, but said that did not excuse his actions.

A pre-sentence report assessed Gotty as having a significant likelihood of violent and sexual reoffending, with a "very high" risk of harm to others.

The report revealed that Gotty had failed to take responsibility for his offending, and refused to engage in sexual offender treatment programmes in prison.

According to the report Gotty suggested the teen victim had only made the allegations because he wanted to claim money from ACC.

The case was initially heard at the Auckland District Court, but was moved to the High Court for sentencing after Crown prosecutor Nick Williams applied for preventive detention.

Defence lawyer Michael Kan argued preventive detention was unnecessary given Gotty's age, and how old he would be once he had served his full sentence.

However that argument was rejected by Justice Downs.

PRISON VIOLATION

Gotty's most recent conviction relates to an incident at Mt Eden Corrections Facility on January 27, 2016.

At the time, he was on remand awaiting sentencing for a separate sexual offence the previous year.

His teenage victim had been in the remand facility for about two weeks and had limited experience with prison life.

The pair knew each other from outside jail, and Gotty subsequently suggested they share a cell together.

On the night of the first lockdown, the teen said Gotty started talking about "real twisted stuff and sexual stuff" and then asked him to engage in oral sex.

The teen felt he had no choice but to comply as Gotty was physically intimidating and had previously boasted about violence against other prisoners.

Gotty performed oral sex on the teen before forcing the teen's head onto his own genitals, telling him he was "his b.... now".

He later argued it was consensual - however, Judge Christopher Field said earlier at the Auckland District Court that consent given based on fear did not constitute true consent.

"I am satisfied beyond reasonable doubt that this happened as the complainant has said," Judge Field said.

"This was done without his consent. There was no way that the defendant could have believed on reasonable grounds that he did consent."

Gotty's conviction was his second strike under the three strikes law.