A man on trial for rape has had the charge dismissed after his accuser texted a witness before he gave evidence.

Taukiri Chris Keen, 31, has spent the last three days in the dock at the Dunedin District Court but there were dramatic developments yesterday morning as a key witness revealed he had received contact from the complainant the previous night.

Just hours after telling the jury about her alleged ordeal, the 19-year-old woman sent text messages to her best friend, who had been with her and Keen immediately before the alleged rape in May last year.

The messages directly addressed what the man would tell the jury.

Advertisement

While the Otago Daily Times has been prohibited from publishing details of the conversation, Judge Michael Crosbie said the ''very unusual'' twist went to the heart of the complainant's credibility and reliability.

''What you have heard has undermined the trial process and the course of justice,'' he told the jury before sending them home yesterday.

The Crown case was that Keen and the complainant had known each other just a few weeks and after some fleeting online contact, the defendant had forced himself on the teenager at a secluded Mosgiel picnic spot.

The woman's best friend, who had been cruising around Dunedin with the pair hours earlier, told the court the complainant had said she was feeling ''horny''.

After admitting he had been contacted by her on Tuesday, the man admitted under cross-examination he was worried she would no longer be his friend and concerned she might be violent towards him.

The ODT can now report Keen served nine years' imprisonment for attempted murder in Queensland when he lured a teenager to an abandoned prison, stabbed him seven times and dropped a rock on his head.

Keen, fresh from an earlier jail stint, met 16-year-old James Gilders and others in October 2005.

They jumped fences to get into the old Boggo Rd prison and spent half an hour there.

As Gilders bent down to help Keen climb a fence, he struck, Queensland Supreme Court documents said.

Keen stabbed the victim in the neck and the stomach multiple times before shoving him forward, causing him to hit his head on a rock.

The defendant picked up a bigger rock and dropped it on Gilders' head, breaking his jaw.

Keen asked the man whether he was dead yet.

''Not even close, brother,'' Gilders replied.

Keen left with his associates, leaving the bloodied victim to find help alone.

Police only found out about the incident because the defendant admitted it while being questioned over other crimes.

While he was locked up, in 2010, the court made a ruling in favour of Gilders for criminal compensation of $58,500.

It is unclear whether Keen had paid the sum but it is understood he was deported to New Zealand in 2016.

Counsel Anne Stevens QC's application for the rape charge to be dismissed yesterday was not opposed by Crown prosecutor Robin Bates.

Aside from the issue of contact with the witness - which the complainant had been repeatedly warned not to do - the judge made some comments on the woman's demeanour.

While in the witness box, she was repeatedly warned about not speaking over lawyers and refusing to answer questions.

Judge Crosbie also revealed to the jurors the teen had threatened not to turn up to court when it became clear she would be required for an extra day.

Keen, who has spent a year in custody, did not walk away from court after yesterday's dismissal though. He awaits sentencing on several dishonesty charges.