A teenager appeared in court today charged with raping a 13-year-old girl outside a 16th birthday party on the Kapiti Coast last year.

The party was for the older sister of the alleged victim's best friend.

They had been given permission by adults to drink and the girl told Wellington District Court today she had been "tipsy".

A video of her police interview was played to the jury in which she described what happened.

The girl, who cannot be identified, bumped into the accused, then aged 16, outside the house as he was going to the toilet.

She said he was very drunk but they knew each other from school so said hello.

He asked her to wait, then pushed her against the house, attempting to kiss her. He pulled her stockings down, forcing her onto the ground where he had sex with her for a short period.

The girl told police she was "screaming my head off" and trying to grab stones which she could throw at the house windows to alert people inside. He pinned her arms and told her to "shut up", putting his hand over her mouth at one point.

She escaped when the youth took his hands off her shoulders to masturbate himself.

As the girl ran away he again asked her to wait, saying "I want to have sex with you again," she said.

Word spread around the party that the girl had been raped and a group of boys caught the accused, beating him up.

Defence counsel Craig Smith told the girl his client, who has name suppression, would tell a different story when he took the stand later this week.

Mr Smith produced a record of text messages the girl had sent that night, including one to her then-boyfriend asking if he would have sex with her.

He asked the girl whether there had been any sexual activity between the two that night.

She said no.

Mr Smith said his client would say that after the girl said goodbye to her boyfriend she approached him outside and began kissing and fondling him.

They lay down together and tried to have sex but he was drunk and his pants were stuck halfway down.

"He will say that after that failed attempt to have sex you stopped kissing him and said you don't want to do it," at which point they went their separate ways, Mr Smith said.

He asked whether she had regretted the way she behaved with the accused and accusations of rape had arisen after her friends found her with a muddy top and ripped stockings.

Crown prosecutor Mark O'Donoghue said a doctor's examination the next day found abrasions on the girl's genitals indicative of "blunt force penetration."

The trial was expected to end on Friday.