A teenage girl was raped and murdered after fleeing partially clothed from the home of a man who groomed her on Facebook, a court has heard.
Kayleigh Haywood, 15, was killed on farmland near the house in Ibstock, Leicestershire, in November last year.
Landscape gardener Stephen Beadman, 29, has admitted raping and murdering her.
Prosecutors say that Kayleigh was also falsely imprisoned before her death by Beadman and his neighbour Luke Harlow, 27.
Harlow has admitted two sexual offences against Kayleigh and grooming her online but both men deny holding her against her will on the evening of 14 November and in the early hours of the following day.
Luke Harlow and Stephen Beadman
Prosecutor Miranda Moore QC told a jury at Nottingham Crown Court that Kayleigh, from Measham, had exchanged messages with Harlow on her Facebook account for about a fortnight, during which time he had been aware of her age.
She had then gone willingly to his home on 13 November, telling her parents that she was staying with a friend.
Ms Moore said: "What you are concerned with is what happened just before Kayleigh Haywood was taken by Mr Beadman off into the night, where she was raped and murdered by him.
"On that night Kayleigh had been given substantial amounts of alcohol and she had been sexually touched by Luke Harlow."
Ms Moore said that neighbours had heard screaming and three loud banging noises during the time Kayleigh was at Harlow's home.
"What happened, on any view, is that Kayleigh made her way out of that house partially clothed."
Kayleigh's body is retrieved by police officers in November
Ms Moore said that a witness looking through an upstairs window had seen Kayleigh being held down on a path by Beadman at about 3.30am on 15 November but had thought Beadman was a police officer.
The Crown alleges that, not long afterwards, Beadman raped Kayleigh in the Sence Valley Forest Park.
Ms Moore said that Harlow's defence was that he had "nodded off" and had no idea how Kayleigh came to leave the house.
Beadman, the court heard, says he does not remember Kayleigh leaving the house but told police that he had killed her.
Kayleigh's body was found in thick undergrowth near a stream. She died of head injuries.