They were aged 10 last October when the girl told her mother that she had been assaulted in Hayes, west London.

The boys were each found guilty of two charges of attempted rape by a 10-2 majority at the end of an Old Bailey trial but cleared of rape.

Jurors rejected claims by defence barristers that the boys -- one of whom was described as a model pupil by his teacher -- were just being naughty or playing a game like doctors and nurses.

Sentencing them, Mr Justice Saunders said: "I do not accept that what happened was a game but I do accept that you did not realise how serious what you were doing was."

But the judge said that to impose any sort of custodial sentence would be "counter-productive" and not in the best interests of the boys.

The judge told the boys: "The jury decided that you did something very wrong which if you had been older would have very serious consequences for you."

He said the case had already caused "immense disruption" to the boys' lives and those of their families, and "great unhappiness".

The judge and barristers dispensed with wigs and gowns, as they had done during the trial, and the boys were allowed to sit in the well of the court with their mothers and solicitors.

After the sentencing they were led out through the same side door through which they had entered.

The judge had told them: "Because you are so young, the court is mainly concerned with doing what is best for you with the aim of ensuring that you do not do anything like it again.

"That means you must be helped to understand the seriousness of what happened.

"The best way to achieve this is to give you the assistance of trained social workers to help, guide and educate you.

"This will also help your family come to terms with what happened."

Shortened

He said the sentences in the case of each boy would be a three-year supervision order but that if "satisfactory progress" was made this could be shortened. There would also be a "parenting order" for 12 months.

The judge said both boys would be ordered to sign the sex offenders' register for two and a half years but directed that "notification" requirements would be placed on their mothers and not the children.

He added: "It may sound from all this that I am forgetting the little girl involved. I do not.

"Everyone will sympathise with her for what she has gone through. Not only what happened to her as the victim of these offences, but also to have to give evidence about them.

"I hope that she will be given all the help that she undoubtedly deserves to get over her experiences. I very much hope that she and her family will not be forgotten by the authorities."

The judge said that the case had generated an informed debate about the way in which young defendants and young witnesses were treated in the courts and he was grateful for the various observations that he had received," he said.

"A number of the questions which arise from the case are not for a judge to comment on. For example, the issue of the proper age of criminal responsibility is a political question and one which parliament had already decided.

"Similarly, questions as to whether to prosecute and, if so, for what charge, are questions for the Crown Prosecution Service, not for judges.

"What is of concern to judges is that justice is done if and when it is necessary to bring young people to court and that includes how they are treated.

"The Court of Appeal has already expressed its surprise that this case was tried in the Crown Court rather than in the Youth Court, which is better equipped to deal with cases involving young children.

"That question involves the identification of and proper application of the statutory requirements."