She said they had met a while before the incident and messaged now and then on Instagram.
They bumped into each other while drinking in town that night.
She later walked with the defendant's friend to a flat where the defendant was, arriving about 4.30am.
Woman says sleeping over did not mean agreeing to sex
The complainant said the defendant was insistent that she stay over, and that it was too late for her to walk home.
"I didn't want him to think that me staying over was an invitation to have sex, or an agreement to have sex, which is why I initially declined because that's usually the intention behind asking that," she said.
"I wanted to clarify with him whether he had that in mind, and so I told him no, that I was just tired and drunk and that I would stay as long as he didn't think that anything was going to happen between us.
"And I said, you know, not right now or not tonight."
She said she agreed to have a "little sleep" before walking home, and he led her into a bedroom where another man slept - which made her feel reassured nothing would happen. She removed her pants and they got into bed.
The pair were spooning when the defendant allegedly began raping her later, pressing his hand on her mouth and telling her to be quiet.
She said she did not wake the other man in the bed because she did not know if he would join in, whether that would make the defendant stop, or how he would react.
"So I just decided to wait until it was over."
The complainant described it as rough, hurried and painful.
"He was having sex with me whether I was a person inside there or not.
"He saw an avenue to get himself off and that was what he was doing."
She said she was not making noise or actively participating - but she was not resisting, worried he would get angry and accuse her of leading him on.
"It felt far easier to let it happen."
She left after he fell asleep and he messaged her later asking if she got home safely.
She said she replied "sad and sound".
Complainant felt like she let it happen
The woman said at the time she blamed herself for what happened.
She said before the alleged rape, she was excited the defendant might be interested in her, and that it "seemed like a nice end to the night".
But afterwards, she said she felt empty.
"I kept thinking about how much more I could have done to stop it from happening and how, when it did happen, all I could think about was of course he didn't just mean going to sleep, of course he would be ... he would be taking me taking my pants off as an invitation.
"All I could think was how I had done this horrible thing to myself.
"I felt defeated, like I'd failed.
"I was in pain ... I felt gross ... ashamed, ashamed and dirty."
Gaps in complainant's memory
Like other witnesses and the first complainant the court had already heard from, the woman said there were parts of the night she struggled to remember.
"I've always had a very interesting memory with traumatic events, or times that I get incredibly overstimulated, I guess.
"It's like I can, I can feel it there but I just can't, can't see it."
She said she did not usually "black out" from drinking but that could have played a part.
Due to technical issues causing delays at court, the second complainant was not questioned by the Crown or the defence today.
The trial continues tomorrow.
Where to get help:
If it's an emergency and you feel that you or someone else is at risk, call 111.
If you've ever experienced sexual assault or abuse and need to talk to someone, contact Safe to Talk confidentially, any time 24/7:
• Call 0800 044 334
• Text 4334
• Email support@safetotalk.nz
• For more info or to web chat visit safetotalk.nz
Alternatively contact your local police station - click here for a list.
If you have been sexually assaulted, remember it's not your fault.