The boy, then 16, pounced on the girl when she was just 300 yards from her home, jurors were told.
The victim's worried mum texted her "where are you?" when she was late home from school.
But minutes later she got a knock at the door from a passer-by who had found the girl wet, muddy and barely conscious, lying in the stream with her underwear pulled down.
The teen, who cannot be named for legal reasons, has already pleaded guilty to choking and sexually assaulting the little girl but he denies rape and attempted murder.
He also denies he intended to choke her unconscious so he could rape her.
Bristol Crown Court heard the boy, now 17, left school on his bike and pounced on the girl on his way home in Exmouth, Devon, on October 4, 2018.
Anna Vigars QC, prosecuting, said: "He took hold of her from behind - around her throat - wrapping his arm around her neck and squeezing hard."
He then dragged her down the bank and raped her, the court heard.
The jury was shown a police interview with the victim in which she described how she pretended to be dead during the attack.
She said: "I got my phone out to call and say I'll be home in a minute and that's when someone ran up to me and grabbed me.
"I was worried that I didn't have enough oxygen and I might die.
"He was doing it tighter and tighter. I couldn't speak because my mouth was really swollen.
"At first I tried pretending like I died or something - I flopped down and I had my eyes shut - I though at that point he might have just left - but then I really did fade away."
She described coming to and calling out for one of her teachers to help her.
A passing member of public heard her cries and came to her rescue, while another asked her where she lived and alerted her mum.
The boy got home late and his family noticed he was "sweating profusely", Ms Vigars said.
"He said something about having fallen off his bike and went upstairs to change out of his muddy clothes," she continued.
The court heard his family noticed his "unusual behaviour" over dinner and after hearing about the incident the following day they examined his muddy clothes before calling the police.
Forensic examinations found the boy's DNA on the victims genitalia and underwear as well as her DNA on him.
She also had injuries to her privates.
The boy maintains he did not rape the child or intentionally cause her to lose consciousness but he does admit strangling her and then sexually assaulting her while she was unconscious.
He pleaded not guilty to one charge of attempted murder, one charge of choking the girl with the intent to commit rape and one charge of rape of a child under 13.
He admits two counts; that he did take hold of her in an attempt to choke her but the intent was sexual rather than, and not rape, which he also denies.