An investigation has now been launched by South Ayrshire Council into the incident at Heathfield Primary School in Ayr.
The teacher, who has not been named, has been off work since the attack in January.
It has been reported that the pupil has remained at school since the incident.
South Ayrshire Council chiefs yesterday said they were “offering appropriate and ongoing support to both individuals”.
It is understood the victim, a principal teacher at the
530-pupil school, was taking a detention session after the boy had been sent to her by his
Primary 5 teacher.
A spokesman for teaching union the Educational Institute of Scotland (EIS) said: “All school and local authority discipline policies should take a firm line when violence is either used or threatened against any member of staff. It’s an issue of serious concern whenever a teacher is attacked or threatened in the workplace.
“All such incidents should be taken extremely seriously. There is no instance where it’s acceptable for a pupil to use violence against a teacher.
“While the EIS does not comment on individual cases, the issue of attacks or threatened attacks on teachers is a very serious problem. Although the number of attacks is relatively small when compared to the number of pupils in our schools, the reality is that one assault on a teacher is one too many.
“Both teachers and the vast majority of well-behaved pupils deserve a safe and secure environment in schools, so any incidents of violence or threatened violence must be dealt with swiftly and in line with the council’s discipline guidelines.”
Douglas Hutchison, South Ayrshire Council’s head of education, said the council was aware of the incident at the school.
He added: “Incidents such as these are extremely rare and we have robust policies and procedures in place to deal with them, and these have been followed.
“The safety and well-being of our pupils and our staff is of utmost importance to us and we continue to offer all relevant support to make sure a secure and positive learning environment is provided at all times.
“This matter has been reported to the police and therefore we cannot comment further.”
The school’s website states that it has five main values for staff and pupils – honesty,
respect, equality, compassion and responsibility.
Staff at the school operate a “green, amber and red” system of rewarding or punishing good or bad behaviour.
Green relates to good behaviour, while amber covers being distracted and distracting others; talking when other people are talking; not following instructions; answering back; and saying unkind things.
Red includes: swearing; being physically aggressive; being verbally aggressive; and deliberately damaging property.