SYDNEY, March 15 - Andrew Ryder, the head of Bourke High School, was allegedly attacked by the 13-year-old with a wooden garden stake at the school's front gate on Tuesday afternoon, police say.

Staff had to intervene to protect Ryder, who suffered cuts and bruises on his forearms and back.

The department on Wednesday commended the actions of both Ryder and staff who sought to "defuse the situation".

"Violence and such behaviour is not tolerated in public schools and if it occurs police will be informed and schools will co-operate fully with their recommendations," a spokesman said in a written statement.

The boy has been charged and will face a children's court on Wednesday.

The department would not say whether Ryder had returned to work.