A 16-year-old boy raped and attempted to murder a 10-year-old girl as she walked home from school, a court heard.
He dragged her down a bank into the stream, tried to choke her then allegedly raped her when she fell unconscious, Bristol Crown Court heard.
She was left to die in the water and came to by herself following the attack in October last year in Exmouth, Devon.
The boy, now aged 17, admits choking the girl and sexually assaulting her but denies attempted murder and rape.
Anna Vigars QC, prosecuting, told the court: "He took hold of her from behind, around her throat, wrapping his arm around her neck and squeezing hard.
"She thought she was going to die.
"She thought a way to avoid the whole thing was to pretend that she was already dead.
"When she pretended that was what was happening to her, she did fade away.
"She can remember nothing from that point until she came to in the stream."
Neither the boy nor the girl can be named for legal reasons.
Police found injuries to the girl's genital area, and the boy's DNA was present on her body and underwear, said Ms Vigars.
"He meant her to die and he left her in that cold stream in October to die," she said.
The girl told police the boy was "holding me so tightly, I couldn't move".
She said: "He was getting tighter and tighter and then I woke up on my own in the river."
The trial continues.