An independent appeal panel overturned a decision by the head and governors of Yorkshire Martyrs Collegiate school in Bradford, West Yorkshire, to exclude the 14-year-old pupils, one of whom was caught trying to sell the gun to the other.
The boys, who have been suspended from school since the incident in January, will return to lessons after the Easter break.
Teachers at the Catholic secondary school were last night consulting unions representatives for advice.
Head teacher John Clarke warned the three-strong panel would now have to accept responsibility for the safety of the school's 1,000 pupils. The case threatened to create a new crisis over security and discipline in schools only months after teachers at the Ridings School, in Halifax, threatened to strike over a breakdown in order.
It highlights afresh the potential for conflict between schools and the independent tribunals which by law have the final say in exclusion cases.
The National Association of Schoolmasters - Union of Women Teachers, holding its annual conference in Bourne- moth, called yesterday for the abolition of the panel, insisting decisions on exclusion should be left up to governing bodies.
The union, which last year waged battles in four schools, including the Ridings, over violent and disruptive pupils, agreed to issue clear guidance to members advising them to take "all possible steps to avoid putting themselves at risk".
Union general secretary Nigel de Gruchy said the Yorkshire Martyrs incident and similar cases had to be dealt with "in the severest fashion". At Yorkshire Martyrs, 42 of 60 staff belong to NAS-UWT. The union's north and west Yorkshire representative Brian Garvey said members would seek to resolve the situation through discussion but would not "shy away from confrontation".
School governors should undergo compulsory training and testing on their role to help puncture their sense of their own importance, teachers demanded yesterday. The NAS-UWT conference heard some governors were "loose cannons", strutting around schools "as if they owned the place".Reuse content