A 12-year-old schoolboy who raped his seven-year-old sister after he watched hardcore porn on the internet has walked free from court.
Social workers will now work with the youngster to return him to the family home in the coming months.
Blackburn Youth Court heard the boy had viewed pornography in the company of his friends before he gained "a desire to try it out".
He committed a number of sexual offences against his sister between March and May last year but the matters did not come to light until last autumn.
The boy, now aged 13, pleaded guilty to one count of rape, two counts of indecent assault and one count of inciting a child to engage in sexual activity.
In a statement, the offender said he was "disgusted" with his actions and promised it would not happen again.
Sentencing him, District Judge James Prowse said he thought it "highly improbable" that the boy would reoffend in this way as he followed the recommendations of a Youth Offending Team to impose a 12-month referral order.
Detaining him would "tear the family apart" and would expose him to "hardened and sophisticated" youth offenders, he added.
In a victim impact statement, the girl said she was "sad" at what her brother had done but she wanted him to come home because she loved him and missed playing games with him.
Judge Prowse said the referral order would be "intense" and was specifically tailored to deal with last year's events.
He said it would be "a tough haul" for his parents, who were also confronting the abuse of their daughter, but he said he felt they were "going to get there".
It is understood the boy had viewed porn on an Xbox games console at a friend's house.
The content had led to "sexual conversation" between the group of friends, the court heard.
Addressing the boy and his father, Judge Prowse said: "Some of the others were telling you about what they had been doing, probably imaginary rather than real. Because of your immaturity you were not able to recognise it, that made you feel further behind the scene.
"When you started watching pornography you had a desire to try it out, having watched what adults were doing.
"Society's view on pornography covers a wide spectrum from complete condemnation on the one side to being laissez faire on the other but even the most liberal-minded share society's profound unease that children of your age can and do access the internet and watch graphic images of sexual intercourse."
He added that technological change had been "enormous" in the last 10 years with online access now readily available on mobile phones and games consoles.
He said "many people" would ask the question whether there was a link between the increases in ease of access to porn and the number of sexual offences committed by children on children.
The boy attended the court with his father and a social worker, who sat by him as he confirmed his name, address and date of birth.
Parveen Akhtar, prosecuting, told the court the girl had struggled to remember the sequence of events but she recalled on one occasion that her brother came into her room at night and led her by the arm into his bedroom.
He took her pyjama bottoms off and then undressed himself before he laid on top of her, she said.
She said she thought her brother had touched her on six separate occasions.
The boy is currently living away from the family home but in a victim impact statement his sister said she wanted him to return.
"I feel sad what (the defendant) did," she said. "I want him to go to our house so I can play games with him. I love (the defendant)."
Graeme Parkinson, defending, said the boy had no previous convictions and had not shown any indication of offending.
He was interviewed by police without a solicitor present last October and went on to make full and frank admissions before he eventually pleaded guilty at the first available opportunity "bearing in mind the trauma it has caused him and members of his family", the solicitor said.
He said two lengthy pre-sentence reports had been completed ahead of today's appearance.
"The intention for the long term is to return the family unit as one," he said.
He said it would happen, however, on "a gradual basis".
He said he had not met the boy's mother but he said his father was "very much a caring and hands-on parent".
"He assures me he will ensure nothing like this will happen again," he said.
"I am sure with the appropriate help (the defendant) will grow up to be a very responsible member of the community."
Judge Prowse said there had been "considerable" and "legitimate" public interest in the case to understand why it had happened.
He told the boy: "The realisation of what you had done brought you to your senses long before any adult became aware of it and on your own volition you stopped."
He said there were no aggravating features such as violence and coercion, and ejaculation had not taken place.
The pre-sentence reports had established he had been brought up in "a stable and secure home".
"The conundrum is why should you have done what you did," he said.
"Adolescence can be a troubling time with confused feelings about sex and feelings of insecurity.
"You were described as being immature for your age."
He said his parents had discovered on one occasion that he had accessed porn on his mobile phone while on a sleepover.
They had confiscated his phone and put an immediate stop to it but they were unaware of what was going on with their daughter, the judge said.
His parents had monitored his internet use at home and could not be criticised in that regard, he added.
Judge Prowse told the boy: "I think it is highly improbable that you will do anything like this again. You do not represent a danger to society.
"You yourself realised what you had done. In your own words you felt disgusted with yourself."
He said the alternative sentence of a detention and training order would put the "unsophisticated, immature" boy in company with "hardened" youth offenders.
That risked sending him in the opposite direction than the judge intended.
He said the aim was to keep the family together.
"If I lock you up it is going to tear the family apart," he said.
He told the boy and his father that the youngster would also be placed on the sex offenders register for two and a half years.
A spokesman for Microsoft said: "We have the greatest sympathy for all involved in this case.
"At Microsoft we have some of the most robust systems that allow parents to control what their children play and watch online.
"For example, access to the internet is switched off automatically for all child accounts on Xbox, and we urge parents to review the settings on their children's consoles."