An off-duty police officer allegedly raped a woman while she slept, a jury has heard.

Gary Ervin (30), whose address was given as c/o PSNI Headquarters, Knocknagoney, denies one count of rape and two of sexually assaulting the woman in the early hours of March 30, 2009.

Opening the case, prosecuting QC Ken McMahon told the Belfast Crown Court jury that the night before the alleged attack, the woman had been out socialising with a friend when she met Ervin in a Belfast city centre nightclub.

As the two women were leaving the club Ervin said he would go with them, said the prosecutor, adding the alleged victim was “happy enough about that because her friend was with her and because he was a police officer”.

At the victim’s east Belfast home, Mr McMahon said the woman was “happy enough” to share a kiss with the officer, but when he allegedly reached up between her legs “she wasn't happy about that” and told him so.

Her friend left just before 4am, and afterwards the woman told Ervin “should you not be going home”?

Mr McMahon told the jury she must have drifted off to sleep |because the next thing she |remembered was “being partly awake, lying on her stomach, her trousers down to about mid-thigh” with Ervin allegedly touching her inappropriately.

Mr McMahon claimed “her next memory is the sound of his belt buckle being released” and then him having sex with her before becoming fully awake.

“She shouted at him a number of times: ‘What the f*** are you doing? Get out of my house' and she started to cry,” he told the jury, adding that she “felt completely violated and was in a state of shock... she couldn't bring herself to look at him”.

After doing up his belt and “kissing her on the cheek”, Ervin left and his alleged victim fled the house. She left it unlocked and got a taxi to a friend's house from where the police were called.

Ervin was arrested and when he was interviewed later told police “it was definitely consensual because she wasn't telling me to pull away... she had plenty of time to tell me otherwise”.

When it was put to him that the woman had shouted and swore at him, Ervin claimed he could not recall words of that nature.

Mr McMahon said to the jury that the woman could not have consented because she had been either asleep or partly awake.