Seven teenagers who attacked a gang member who went to their school allegedly looking for a fight, took the "law into their own hands", the school principal says.

The incident, which occurred at Trident High School in Whakatane on Monday, attracted a crowd of onlookers as the man was kicked and punched, the Whakatane Beacon reported.

The 22-year-old victim was arrested for breaching his bail conditions and was trespassed from the school, while two others were trespassed in an effort to calm the situation.

The year 11, 12 and 13 students involved have been stood down and would attend a disciplinary meeting on Friday involving school staff and police youth aid officers.

Principal Philip Gurney said the man, a member of the Crips gang, had come to the school allegedly intent on assaulting a year 10 student he believed had verbally bullied his sister.

"He was very abusive of the school and stood in the middle of the area and shouted abuse at everyone," Gurney told the Beacon.

He said it had been an intense situation and the majority of students were well behaved.

"Students held back until one of our students took particular [offence] to something the man said and unfortunately lost his cool and charged in, which then led to [the incident]."

Video footage taken on a cellphone shows the student being held back by another student before breaking free in response to the taunt "you think I'm scared of a little boy", and launching himself at the man.

A group of students then chase the man around a corner where he is kicked and punched. The incident lasts 30 seconds before being broken up by teachers.

Gurney said that while the incident would not have occurred if the man had not come onto the school grounds, the behaviour of the students involved was unacceptable and not condoned by the school.

"We are taking it very seriously," he said.

"The students could say they were defending their territory, well that's nonsense, we don't accept that at all.

"They know the rules and if something like that was to happen there were any number of staff who would have gone out and handled it. They took the law into their own hands and they will have to carry the consequences."

The school had been in contact with the parents of the man's sister who was allegedly bullied to make them aware of procedures and what they should do if they had any concerns over bullying.