Warning: This story contains graphic details that may be disturbing to some people.
A prison inmate thought he was going to die after allegedly being forced to perform sex acts on his bunkmate.
Benjamin Nilesh Goundar is on trial at the High Court in Wellington and denies charges of common assault, sexual violence and threatening to kill while at Rimutaka Prison.
The Crown accuses Goundar of raping and sexually assaulting his bunkmate - who has name suppression - from October 2017 to January 2018.
Crown lawyer Mitchell Heslip said the complainant was forced to perform oral sex - and if he did not agree, was slapped and threatened.
"Throughout this period the defendant meted out violence in the form of punches and slaps ... this was either as part of making him submit to sexual violations, in anger from his refusal to submit to him, or otherwise displeasing him generally," he said.
Heslip said a week-and-a-half after the assaults started, Goundar forced himself on the man for the first time.
He also threatened to kill the man.
"[The bunkmate] refused to come down from the bunk bed and said he was going to move cells the next day - Mr Goundar threatened to kill [him] and pulled a shank on him," he said.
The complainant appeared in court today, with a support person sitting next to him.
A DVD of his complaint interview was played to the jury.
In it, he said the assaults happened most nights for months - but he stayed silent and did not seek medical treatment out of fear of repercussions.
The abuse only stopped when authorities were alerted and removed Goundar from the cell.
Goundar's lawyer Karun Lakshman did not give an opening statement to the jury.
He will have a chance to cross-examine witnesses and give a closing statement.
Justice Clark has reminded the jury of four women and eight men to keep an open mind.
The trial could last up to a week.