By Jonathan Kent
BBC correspondent in Kuala Lumpur
Malaysia's second-highest court has backed a head teacher's decision to expel three Muslim boys for wearing turbans to school.
Malaysian schools have strict rules about what children can wear
The judge overturned an earlier ruling that the school's ban on turbans had violated the right to freedom of religion.
This is enshrined in the predominantly Muslim country's constitution.
The opposition Islamic party, Pas, denounced the decision, likening it to France's recent ban on headscarves.
The three boys were expelled from a government school in the state of Negri Sembilan in 1997 for wearing what is known locally as a serban.
The flowing turban is not a traditional part of local Muslim costume. However, it is often worn by those who have studied at religious schools abroad, particularly in the Middle East, or who support Pas.
The Malaysian government does not allow overt religious symbols in its schools. It is anxious to prevent friction between the country's different groups and discourage the spread of conservative Islam.
It does make exceptions though, and permits Sikh students to wear turbans and Muslim girls to wear a headscarf, though not a veil.
Five years ago, a lower court ruled for the boys parents, who had argued that the turbans were part of Islam, and ordered the school to reinstate the pupils.
But Court of Appeal judge Gopal Sri Ram has now decided otherwise and says the courts have no place getting involved in disputes between pupils and school principals.
However, the decision has provoked an angry response from Pas.
A spokesman for the party said the government could not both support the pupils' expulsion while professing to uphold Islam and practise religious tolerance.