In 1997, three boys aged between 10 and 13 were expelled from a government-run school in the southern Negri Sembilan state for wearing turbans, known in Malaysia as serbans.
Their parents took legal action and the high court ruled in 1999 that the boys be allowed to wear the serban after lawyers argued that it was part of Islam and the constitution allowed freedom of religion.
The government appealed against the decision, arguing that the school's action was in line with government regulations, and the court of appeal on Monday overturned the earlier judgment, saying dress codes were for the government and school administrators to decide.
"If the courts were to interfere, we might as well manage the schools," judge Gopal Sri Ram was quoted as saying by the New Straits Times. "We have to interpret the constitution sensibly and in the context of a multi-racial society."
Muslim Malays make up about 55% of Malaysia's 25 million population, with Chinese accounting for 25% and Indians 7.5%.
Explaining the decision in a country where Muslim schoolgirls can wear headscarves, a lawyer said serbans were usually associated with "Muslim elders, imams, those who are wiser".
Muslims make up about 55% of
Malaysia's 25 million population
But PAS central committee member Hatta Ramli said: "It's moving backwards from a decision allowing freedom of expression for the children.
"If people start to ban such kinds of freedom of expression, we would be no different from France where they have banned headscarves in schools," he said.
Under a controversial new law prohibiting the wearing of conspicuous religious insignia in state schools and colleges in France, Muslim headscarves are banned along with Jewish skullcaps and Sikh turbans.