A 12-year-old boy raped a nine-year-old girl because he wanted "to feel grown up" after viewing graphic images of sex on the internet.
The High Court in Edinburgh was told that the case may be the "tip of the iceberg" amid concerns that teenagers were learning about sex through pornography.
The youth, now aged 14, told police when questioned that he had raped the girl because of "temptation" and, when asked what the temptation was, replied: "to feel grown up".
Defence advocate Sean Templeton told judge Lady Smith:
"There is a real risk that young people of the current generation of teenagers are growing up with a skewed view of what sex is and sexual activity.
This was an emulation of an adult act witnessed by him at this young age.
He was afforded unfettered access to the internet and it has become apparent from a very young age, the age of 12, he was accessing hard-core pornography."
The boy, who cannot be identified because of his age, had earlier admitted statutory offences of rape and sexual assault committed between December 1 2010 and January 31 in 2011 at a Scottish island community.
Advocate-depute Jane Farquharson said the offences came to light after the girl had been complaining of having a sore stomach and would not accept her mother's explanations for what might be wrong.
She eventually asked if her problem could be caused because she was about to have a baby. Her mother asked her if something had happened to her and she became hysterical before revealing what the boy had done.
Lady Smith could have jailed the boy under the 2009 Sexual Offences (Scotland) Act, but decided instead to refer the case to the children's panel.
Mr Templeton said that the victim's mother had given a statement in which she said she wanted the boy to get help. He argued that there were benefits in sending the case to the children's panel as it would allow him to be supervised until he was 18.
"The hope obviously is the behaviour can be addressed in order that he can go on to have a normal adult life with normal relationships with other adults," Mr Templeton said.
Lady Smith told the boy he was being given an opportunity to "make something of yourself", to put his mistakes behind him and accept the wrongdoing and to think carefully of what it was like for the girl and "what she is living with because of that wrongdoing".
"You should not and must not regard pornography as any guide at all as to how to behave sexually. You should not have engaged in sexual activity of any sort with a nine-year-old girl or indeed any other young girl who, under our law, is not able to consent to it."