The High Court has quashed a decision compelling a rural school to re-enrol an eight-year-old boy who was expelled after assaulting five members of staff - striking one with a hurley.

The court heard that the boy, who has special needs and is on the autism spectrum had in the last few years been involved in 30 incidents, where teachers, special needs assistants and other students were bitten, assaulted, kicked, punched and head-butted by him.

In his judgment at the High Court, Mr Justice Richard Humphreys ruled that the direction by Department of Education requiring the school to take back the student was "otherworldly", "fundamentally flawed", and "riddled with irrelevancies".

The judge said that the decision-makers also failed to take into account the rights of other students at the school to an education, as well as the school's staff and students' rights to bodily integrity.

In all the circumstances the judge said he was satisfied to quash the decision, and ordered that the matter be remitted back for fresh consideration.

Neither the student nor the school can be identified for legal reasons.

The decision was challenged by the school's board of management.

The board, represented by Feichín McDonagh SC and Joe Jeffers Bl, said the action was being brought in the interests of avoiding serious risk to the safety of other pupils and staff.

Counsel said the boy was involved in 38 incidents over a two-year period including a very serious incident in April last when the boy began chasing another pupil around an empty classroom with a hurley.

All of the other pupils had been removed from the room for their own safety.

A female teacher, who was trying to reason with the boy, had been punched in the chest by him and when he was removed from the room he had started kicking and hitting both the principal and the teacher, who he struck in the leg with the hurley.

The boy had tried to gain entry to a classroom where other students had been put for their own safety by using the hurley and later a baton, punching the teacher in the face when she succeeded in getting the hurley off him, then kicking her repeatedly in the legs.

Two teachers, who he had assaulted, had to go to a hospital for treatment, one for a suspected fractured cheekbone. The boy's mother arrived and had taken him from the school.

The school suspended, and then formally expelled the boy.

The boy's mother appealed that decision to a three-person Department of Education appeal committee under Section 29 of the 1998 Education Act (known as a Section 29 Committee).

Last August the committee overturned the school board's expulsion decision. The Department of Education directed the school to re-enrol the boy.

The school brought High Court proceedings against the Department and the three committee members.

The boy's mother was a notice party to the action. She told the court that the school "had not done its job" that the staff there "hadn't a clue."

She also said that other parents were unhappy and had removed their children from the school.

The Department opposed the school's application and argued the committee's decision should be left undisturbed. The mother also opposed the action.

In his judgement, Mr Justice Humphreys noted that one of the criticisms made of the school staff is that they did not grab or restrain the boy last April when he grabbed the hurley and had struck others.

Counsel said that the school's staff would not do that over fears they might be reported to Tusla, the Child and Family Agency.

The judge said such claims were "easy to make and hard to disprove" and were, he added a sad commentary of the Irish education system.

The judge also noted that the boy had been on a child protection list, due to the mother's mental health. He said the mother had made a complaint about the school, claiming her son had been locked in a toilet, to the gardaí.

That, he said, was not much thanks for the efforts staff at the school had made in respect of the boy from the time he started at the school.