The prosecution in the trial of a 29-year-old man charged with rape who claims he was asleep at the time has said "drink and opportunism" was a more likely explanation than "sexsomnia".
The accused has conceded he could have had sex with his friend when they shared a bed but says it was a result of sexual parasomnia or "sexsomnia", a sleep condition that causes sufferers to carry out sexual acts while asleep.
Sleep experts have told the trial it was "more likely" he was asleep at the time.
The trial has reached its closing stages with the jury at the Central Criminal Court having heard closing arguments from the prosecution and the defence.
In closing arguments today prosecuting counsel said the more likely explanation was "drink and opportunism".
Senior counsel Patrick McGrath said the jury was entitled to be sceptical about evidence given by sleep experts.
He said all the experts agreed that sleep-walking only occurred in a minority of people and parasomnia and sexomnia was even more unusual.
He told the jury it should apply common sense to the case and the more likely scenario was that the accused man either acted under the influence of alcohol or did something and later regretted it and was now looking to justify his actions.
Mr McGrath said the jury had heard evidence that the issue of sleep walking was only raised by the accused man three days after the event when the alleged victim said he had raped her.
He said the evidence about sexomnia had not been rigorously tested. He said the expert witnesses for the defence were "asking you to ignore the obvious".
Counsel pointed to evidence from the prosecution's medical witness about the actions and conversations the accused had on the night.
He said these were not just confused mutterings but were conversations about what was going on.
His behaviour was not consistent with parasomnia, and the proposition did not stand up to scrutiny, Mr McGrath said.
However, counsel for the defence Hugh Hartnett said the accused man had a history of sleep difficulties and reminded the jury of evidence given by a number of friends about his previous sexual behaviour while asleep.
He said the suggestion that the defence of sexomnia only came about when gardaí got involved was "destroyed" by the fact that he had contacted a sleep clinic in Edinburgh very soon after the event and before the matter was reported to gardaí.
Mr Harnett said it was lucky for the defendant that emails with the clinic, which predated any complaint to gardaí, had been saved.
The defence counsel said the alleged victim has said she was not going to make a complaint about the incident and both had sought help from the rape crisis centre.
It had been discussed extensively with his mother and the victim.
"She was of the view that she would not go to the gardaí and that he had a problem and should seek help," he said.
Something happened that caused her to change her mind but there had been no proper explanation for what caused this change of mind, Mr Harnett said.
He said there had been text messages sent between the woman and a friend who was a lawyer and a suggestion that text messages could be used in evidence but this material was now "missing" and the woman has said she could not remember if she had deleted those messages.
"The change of mind was never fully explained and we don't know what was in those messages," Mr Hartnett said.
He said the defence had called world-renowned experts in the field of sleep disorders while the prosecution had not had such expert witnesses.
"It is not sufficient to say 'possibly or probably', the prosecution must prove its case beyond a reasonable doubt and it has failed to do that," he said.
Mr Justice Patrick McCarthy is now summarising the case for the jury and instructing it on the law.
The trial previously heard evidence from Dr Catherine Crowe, director of a sleep clinic based at the Mater Hospital, who said she believed the alleged rape was "more likely" an episode of sleep sex.
She said the accused had a clear history of parasomnia, or sleepwalking, going back to early adolescence.
Dr Crowe said he had a history of sexsomnia before the alleged rape and according to his former girlfriend, continued to have sleep sex afterwards.
However, prosecution witness Dr Harry Kennedy, Clinical Director of the Central Mental Hospital, said it was his opinion that the man's behaviour demonstrated full intact mentally capacity at the time.
The jury is expected to begin deliberating on a verdict tomorrow.