A WOMAN was allegedly sexually assaulted in her house by a stranger who accosted her as she walked home from a night out, York Crown Court heard.

A neighbour of the woman claimed she was woken at about 4.30am by screaming, saw a man with a bicycle walk out of the woman's house, got a dressing gown on went into the street where she found the woman in the street being comforted by other neighbours.

"She was just cowering on the floor. It was quite distressing to see her. She was obviously in a bad place," the neighbour alleged. "She was extremely upset, sobbing and screaming. She had obviously experienced something that had put her in that state. I don't know what it was."

Lee Abraham Yebdri, 25, accepts that he was the man who left the house in the early hours of August 27, 2014, but claims that the woman consented to sexual activity with him, Aisha Wadoodi, prosecuting, told the jury.

Yebdri, of Princess Drive, Acomb, denies sexually assaulting the woman.

Opening the prosecution, Ms Wadoodi claimed the woman, in drink, was walking to her terraced York house after a night out with her friends.

"All of a sudden, the defendant pulled up alongside her on his bike," she alleged.

She claimed the two did not know each other and that the woman was surprised that the man did not leave when she got to her house.

She alleged the woman told the man she wanted to go to bed, but allowed him to have a smoke in her garden.

After she felt unwell and was sick, the man asked her for a kiss and a hug, alleged the barrister. She refused and when she went inside, he followed and sexually assaulted her.

The neighbour, who lives opposite, told the jury she had known the woman since she was a child.

She claimed she was nodding off in bed when she heard a woman screaming in a distressing way. She went to the window and looked across at the woman's house where there was a light on.

"I just saw a man coming out of the house through the doorway with a bicycle," she claimed. "He turned right out of the house and rode to the top of the street. He actually got onto it (the bicycle) as quickly as he could."

The trial continues.