The school's governors went to the high court after Bristol City Council's exclusion appeal panel ordered the 14-year-old boy's reinstatement, but had their case dismissed by Mr Justice Hooper.
Rejecting the governors' judicial review challenge after a two-hour hearing, the judge said: 'The appeal panel reached a conclusion it was reasonably entitled to reach.'
The governors and the school's headteacher decided the boy should be permanently excluded after a playground brawl in March in which another pupil was said to have 'wielded a chain.'
But the exclusion appeal panel disagreed and ordered the school to take the boy back in May.
The panel said that, although the boy had taken a knife to school, the other allegations against him had not been proved, and his behaviour had not been so serious as to justify expulsion.
Upholding the Panel's decision, Mr Justice Hooper said he had 'no doubt' that the boy's behaviour had been fully investigated and the decision to reinstate him could not be described as irrational.
The judge told the court: 'It is the governors' case that the Appeal Panel must have completely ignored the fact that the boy pulled out a knife during the fight.'
Miss Karen Steyn, for the Governors, also argued that, on his own admission, the boy had aimed kicks at another pupil's head which would have caused serious injury had they connected.
But Dr David Woolf, representing the appeal panel, said there was no evidence that the blade of the knife had been opened, nor that it had been used to threaten the other pupil.
Strand News Service