A judge accused lawyer Davina Murray of "wasting time" with a "meaningless, drivelling submission" as she defended herself against a charge of smuggling contraband to murderer and rapist Liam Reid in prison.
Murray made a series of applications for the charge to be dismissed after the Crown concluded its case at Auckland District Court today, blaming the police and even the judge for failing to give her a fair trial.
She accused police of a "bad faith investigation" and abuse of process.
Judge Russell Collins stopped her at one point.
"You're wasting time," he said. "This is a meaningless drivelling submission that is designed to timewaste and get to an adjournment."
Murray folded her arms and raised her voice before making a further application to have the charge dismissed, alleging "judicial bias" by Judge Collins.
That application was also dismissed.
Murray is accused of smuggling an iPhone, cigarettes and a lighter to Reid inside Mt Eden Prison on October 7, 2011.
The Crown says Murray was more than just a lawyer to Reid - they were having a relationship and text messages show Murray planned to secretly marry him inside prison.
Reid alleges prison guards planted the cellphone in his shoes.
Flanked by two security officers, Reid returned to the stand today to describe how after his visit from Murray he was put in a holding cell for 20 minutes before two guards came in.
"They just wanded me with the metal detector and we were out of there."
Reid refused to answer the Judge's question about whether the metal detector went off.
"I've got an issue, this is a surprise - me being called up now. So you know ... like ... I haven't had a chance to be briefed properly."
Judge Collins responded: "It's a simple matter, Mr Reid. Just answer the question. Tell us what happened, that's all you've got to do."
Reid said the detector went off and he was ordered to strip. He said one of the guards tried to manhandle him against the wall.
"I said: 'touch me again when I'm naked and I'll have you up for sexual assault'."
Reid said the second guard left the cell with his shoes and came back a short time later with the shoes in one hand and an iPhone in the other.
That evidence was never put to the guards, Neal Purcell and Maurice Stanley, and is in stark contrast to what they said in evidence.
They described finding a lighter and cigarettes down Reid's pants and an iPhone hidden in the toe of one of his shoes after a random check.
After the search, Reid was ordered to squat so the guards could check if anything was hidden in his "nether regions".
"There was a substance there," Mr Purcell said. "We asked him to hand it over ... and he poked it back up there. When we asked him to hand it over, he said: 'If you touch me - it will be sexual assault'."
Reid is serving a 23-year sentence for the 2007 rape and murder of deaf woman Emma Agnew and the rape, attempted murder and robbery of a 21-year-old student in Dunedin nine days later.
The hearing had been due to finish today but will now continue on Monday.