Bethnal Green Technology College in Tower Hamlets, east London, lies in the middle of a housing estate where Bengali families predominate. Problems arose when the closure of schools in the neighbouring borough of Hackney meant large numbers of Turkish, Afro-Caribbean and black-African children were relocated. Bethnal Green pupils saw the newcomers invading their territory and both groups closed ranks.
"The pupils saw it as racism but it was really territorialism," says Marie Hamer, an English teacher and student leadership co-ordinator at the 11-16 school which has a roll of 860 pupils.
"They started walking round in large numbers and when you see 25 lads walk across the playground in that way you get a sense that a fight is about to happen. A lot of teachers found it very threatening and if you confronted one pupil the entire group worked as a unit in defence."
The simmering tension largely involved a Year 11 group from Hackney and Year 10s from Bethnal Green and came to a head in the spring of last year.
"We had a series of fights and there was one day when it was just horrendous in the playground. Students were bringing in knives and hammers to protect themselves, and if we confiscated those they wore belts with large buckles they could use as weapons," recalled Ms Hamer, who was then in her first year of teaching. "There were times when you'd be afraid for your life, and the kids were aware of that."
An attempt to tackle the problems by way of a whole-school assembly disintegrated when the Year 10 and 11 groups arrived at the hall at the same time and fighting broke out.
The end of the school day was a particular flashpoint and police were frequently called to escort the Hackney pupils to their buses, as news of incidents in school quickly spread. "There were times when the entire route was lined with youths above school age with bandanas covering their faces," said Ms Hamer.
Police found weapons hidden near the school, including a chisel, knives and hammers, although PC Mark Perry, the safer-schools officer, said there were no recorded incidents of their use.
"They wanted to look hard and word would get around that someone had something," he said. "If they had wanted to use them they would have. We were concerned that there would be serious trouble; we didn't want a dead body."
At this point the school realised it could not tackle the problem alone and turned to Leap, a charity which specialises in addressing youth conflict. After training four teachers as mediators, Leap took around a dozen Bengali pupils, by then in Year 11, on a weekend residential trip. The aim, according to Andy Jukes, Leap's gangs and territorialism worker, was not to portray gangs as bad, but to focus on the consequences of certain actions.
"The top reason young people join gangs is for safety the world of the teenager is a threatening place and they also get a sense of belonging and self-esteem," he said.
"Gangs put them at risk from peer pressure to do risky things and because they could be targeted by other gangs. We don't pretend there is a good choice and a bad choice, but we say there is a cost to behaving in a certain way."
Over the course of the weekend, the pupils took part in exercises including conflict map (see panel, left), Red Flag, looking at what makes them angry, and the gamble of revenge, using dice to show how the cycle of violence can escalate. The pupils also learnt about Fido fact, interpretation, decision, outcome to illustrate how a disrespectful look is a matter of opinion and a violent response can lead to a court appearance.
"Most young people say they don't want to be involved in conflict they don't want to be fighting all the time and we say we have something that we think will help," Mr Jukes said: "We don't say they should stop whatever they are doing; we get them involved and ask them if they want to feel they have no choice but to do something that is going to put them in jail."
He says the success of this approach depends heavily on the involvement of the school and on identifying those pupils who have too much invested in the gang to give it up. Gang leaders have left sessions before, taking their followers with them, and identifying these "blockers" beforehand can be crucial.
Leap's involvement was by no means the only prong in the strategy. Bethnal Green had gone into special measures in January 2006 with inspectors highlighting "the disruptive behaviour of many pupils," but Mark Keary, appointed headteacher in March that year, introduced a new behaviour policy.
"The school had broken down. It no longer had an identity and we had to recreate one," said Mr Keary. "There were ambushes in my first week here and it had degenerated beyond anything I had ever experienced. It was orchestrated and staff had no control they were shell-shocked. The Leap work can deal with the individuals, but unless you deal with the conditions surrounding that then all you are doing is trying to tame the fire."
Six pupils were permanently excluded and the police helped put together Acceptable Behaviour Contracts for those on the verge of exclusion. A secure room for pupils who could not be contained in class, considered the most negative place in the school, became a student centre where peer mediators and mentors run drop-in sessions.
The departure of the Year 11 group that formed one of the rival gangs also clearly played a role.
The cumulative effect has been dramatic. In November last year, inspectors noted that progress in creating a more harmonious environment was outstanding. "So many students from all years told inspectors how much behaviour has improved and that they feel safe," said Mr Keary. The school came out of special measures in July.
Ms Hamer, a graduate of the Teach First scheme, which aims to attract high flyers into challenging schools, is now going into her third year at Bethnal Green. She said that the atmosphere in the school had changed almost beyond recognition.
She had been accustomed to pupils throwing chairs at teachers and smashing computers. It wasn't unusual to be pushed, but now anyone crossing the boundary of acceptable behaviour would be excluded, a sanction that wasn't previously used.
"We don't have pupils walking around en masse, and the relationships across the ethnic groups have been transformed," she said. "They were consistently making bad choices and they were aware of that. We needed to build their self respect and self-esteem it was about seeing the best in them before they could see it themselves."