Primary school headteachers and their deputies across Scotland are to be given lessons in how to restrain violent pupils.

The classes are to be introduced in the wake of growing concern over assaults on staff, and other youngsters.

The initial course, in crisis aversion, aims to help teachers defuse a situation without the need for violence. But physical restraint techniques, such as holding pupils' arms, will also be taught to show heads the correct way to deal with troublemakers.

Figures released last year showed a 25% increase in attacks on teachers in 2005-06, with 2768 incidents of physical violence against school staff, and a recent Scottish Executive-backed survey by the National Foundation for Educational Research found that primary teachers thought schools had become more violent since 2004.

The lessons for primary heads are being introduced by the Association of Headteachers and Deputes in Scotland (AHDS) after calls at its annual conference in Edinburgh.

Some local authorities already offer courses to staff on the use of physical restraint in the classroom, but provision varies greatly from one local authority to another.

The AHDS wants to see a more consistent approach and greater clarity about how far staff could go to restrain a child physically, given the potential for parents to sue if they feel their children have been assaulted.

The union has also made a request to the Scottish Executive for funding, with a decision expected in the next few weeks. The courses, which will be run from next March, aim to raise awareness of theories and techniques to defuse or avoid conflict in the classroom.

Greg Dempster, general secretary of AHDS, said there was a growing demand for teachers to be equipped with techniques to deal with difficult or violent pupils.

"Our members have recognised that they are being faced with more difficult situations, but they are also concerned about dealing with them," he said. "They don't want to be hauled through the courts if they restrain a child without using the proper techniques."

David Leadbetter, director of Crisis and Aggression Limitation and Management, the company which will deliver the training, said teachers had a statutory right to touch pupils for the purpose of self-defence.

Judith Gillespie, of the Scottish Parent Teacher Council, said she hoped the scheme would promote safe and effective ways of dealing with violent or unruly pupils.

"If the situation is such that a child has to be restrained, teachers should be aware of what is safe to do. It is important that they know the safe way to restrain a child as teachers wouldn't want to hurt a child because they were ignorant about what to do," she said.

Two years ago, Simon Simpson, deputy head of a primary school in Glasgow, was charged with assaulting a pupil. He was accused of injuring an 11-year-old by dragging him across the floor by his feet. After a nine-month ordeal, he was found not guilty at Glasgow Sheriff Court after a sheriff ruled he had tried to move the boy for his safety.

It also emerged the boy had tried to punch Mr Simpson and had already assaulted another pupil in the playground. The pupil had been suspended six times for incidents.

A 13-year-old pupil was removed from Gleniffer High School in Paisley last week after allegedly striking headteacher David Nicholls following a classroom argument.

Earlier this month, the Educational Institute of Scotland urged schools to crack down on the misuse of mobile phones after a teenage pupil was allegedly filmed punching his headteacher in the face in a "happy slapping" attack.

A 15-year-old boy has been charged in connection with the incident.