A teenager raped a woman after comforting her when she was upset following an argument with her boyfriend, Lincoln Crown Court was told.
Jamie Law sat down with the woman on a street bench in the centre of Lincoln following the row which ended with the boyfriend walking off.
Rebecca Herbert, prosecuting, said Law drank vodka with the woman before they took a taxi back to her flat on an estate in the south of Lincoln.
The pair continued drinking before the woman went to bed leaving Law to sleep on her sofa.
The woman fell asleep but was woken by a telephone call from her boyfriend.
Law then walked into her bedroom and pinned her down before raping her.
Miss Herbert said: "The defendant put a pillow over her head and pushed it down so hard that she could not speak.
"He got off her but then grabbed her again and applied force to her throat to stop her from shouting.
"She thinks that she passed out.
"Eventually she managed to get up and get the defendant out."
Miss Herbert said the woman tried to get help but ended up running barefoot in her pyjamas into the street where a man came to her assistance.
Law made his way to the probation services offices in Lincoln where he asked to speak to a police officer.
He then said he had done something "really stupid" and admitted a woman had accused him of rape.
Law, 19, of Winchester Road, Wainfleet, admitted raping the woman on July 6, 2012.
He was sent to a young offenders' institution for four years.
Law was also placed on the sex offenders' register for life.