A girl accused of hanging a five-year-old boy from a tree has been given a 12-month referral order by magistrates in West Yorkshire.
The boy was injured in woods at Earlsheaton
The girl, who was 12 at the time of the attack, appeared at Dewsbury Youth Court having admitted assault and lying to police about the incident in a wood.
The court had earlier heard the boy escaped death by a few seconds in May.
During Monday's hearing, the girl's solicitor accused police of allowing the case to be sensationalised.
Length of wire
At the earlier hearing, the court was told that the boy had ligature-type marks on his neck when he was found wandering alone behind the Earlsheaton medical centre near his home.
Home Office pathologist Christopher Milroy, who examined the youngster, said firm pressure had been applied to the boy's neck and throat with a length of string.
He had told an earlier youth court hearing: "If applied for a few seconds longer there is a strong likelihood that [the boy] would have died."
On Monday the girl's solicitor, Mr Anastasis Tasou, gave her account of the incident.
He said the girl denied hanging the boy from a tree but had used a piece of wire to tie him to a tree around his neck.
His client was upset on the day of the attack after a family argument and she had walked to the woods on her own with the youngster following behind.
He said: "She tried to hide away from the complainant but to no avail.
"She decided to pick up a length of wire in the wooded area and tie him to a tree."
'Scared, lonely girl'
Mr Tasou said his client realised the boy was in distress and called for an ambulance. Because he was so upset, she decided to take him to a nearby takeaway where she bought him a can of pop.
Mr Tasou described the police's behaviour as "reprehensible" saying they had treated the girl as an adult and senior detectives more accustomed to interviewing murder suspects were in charge of the case.
He added: "She is a mixed up, scared, lonely girl with many problems she has to deal with. She did something that was wrong and she realised at the time it was wrong."
Mr Tasou said his client had witnessed her mother dying on Christmas Eve last year and it had had a traumatic effect on her.
"My client was present when attempts were made to resuscitate her mother.
That must have been traumatic for anybody, let alone for a 12-year-old girl."