A 13-year-old Dublin boy has avoided being sentenced for possessing a knife and producing a hammer during an assault on his teacher.
Dublin Children's Court agreed to a garda request to strike out the charges.
But Judge John O'Connor warned the boy that, if he fails to take part in the garda juvenile diversion project, the case could come back to court.
The boy, who cannot be named for legal reasons, was accused of two offences arising out of an alleged incident at his secondary school last September when he was 12.
He was charged with production of a large hammer during an assault, and unlawful possession of a knife as a weapon, during a meeting with his year head.
A decision is awaited on whether or not he will be expelled.
Last month, Judge O'Connor granted an adjournment at Dublin's Children's Court after requesting a special direction from the Director of Public Prosecutions on whether the case should proceed in view of the boy's age.
Today's hearing was told that gardaí were seeking to have the case withdrawn to allow the youth to be dealt with through their juvenile diversion project instead.
The Court was a told that there had been previous attempts to offer the teenager a place on the diversion project but that he had refused to co-operate.
Judge O'Connor agreed to strike out the charges but warned the boy, who was accompanied to court by an adult family member, that failure to take part in the garda programme could result in the case coming back to court.
The teenager spoke briefly to the judge to thank him and to indicate he understood.
Directions from the DPP are also awaited in connection with another prosecution brought against the boy.
He still faces three counts of dangerous driving over an alleged incident in January.