A Northern Ireland education board has lost a legal battle in the UK's highest law court, the BBC has learned.
The North Eastern Board faces a legal bill of about £100,000 following the case, which involved a 15-year-old boy suspended from school as a precaution.
The boy's lawyers argued the principal acted unlawfully. The High Court in Belfast ruled in favour of the board, a decision backed by the Court of Appeal.
But the Supreme Court held the rules did not allow pre-emptive suspensions.
The court, which sat for the first time in London last October, acts as a final court of appeal in cases of major public importance.
In 2007, the unnamed boy was a Year 12 pupil at a controlled secondary school in County Antrim.
Two girls at the school approached the principal in January that year; he was told that one of them was terrified of the boy, but she did not want the accusations spelled out to him in case that identified her.
'Subtle and covert'
The other girl later went on her own to the principal, and told him her friend was "thinking of ending it all".
She told him of the boy's bullying misbehaviour, which was "subtle and covert". The principal took her account very seriously, viewing it as being "sincere and genuine".
He also heard allegations that conduct of a sexual and violent nature had taken place outside the school; it is not clear from the judgement whether the boy was charged with any offences.
The boy was suspended on 7 February. The principal told him certain allegations had been made against him, but that he could not go into them.
During his suspension, the GCSE pupil was taught at his grandparents' home, where he lived.
His family complained and took legal action, claiming the school principal had acted unlawfully by making the suspension precautionary.
The Supreme Court justices held that the board's own rules on suspending pupils did not allow suspension as a precaution.
They found the boy had not had the accusations spelled out to him and was therefore unable to attempt to refute them.
The Supreme Court justices sympathised with the school principal, whom they said "was undoubtedly faced with a very difficult situation".
Sir John Dyson SCJ said the principal could have explored alternative avenues, such as investigating the allegations on the basis of evidence from the girl's friends.
"If this proved impossible, he could have asked (the girl) and her mother whether they would object to his investigating the alleged incidents using the evidence of the girls as well as her evidence.
"He could have explained to them that he owed a duty to everybody at the school to decide whether the complaints that had been made by (the girl) and the other girls were true and that he was required by law to ask the appellant for his version of events before deciding what steps, if any, to take."
The court ruled that while the boy had been unlawfully suspended, his human right to education had not been infringed because he had been given tuition at home.
BBC Northern Ireland education correspondent Maggie Taggart said the case would have repercussions across all controlled schools in Northern Ireland.
Our correspondent said it was understood the schools used much the same set of rules on suspension of pupils.
The Department of Education said it was studying the judgement to see what guidance needed to be given to schools.
Solicitors for the boy involved in the case welcomed the Supreme Court's decision.
However, they said they would appeal to the European Court of Human Rights in Strasbourg the justices' decision that the boy's right to an education had not been infringed.