Employers are allowed to ban headscarves at the workplace under certain circumstances, the European Court of Justice (ECJ) ruled Tuesday.
"An employer's desire to project an image of neutrality towards both its public and private sector customers is legitimate, notably where the only workers involved are those who come into contact with customers," the court said in a statement.
The ECJ ruling refers to the Belgian case of Samira Achbita, a Muslim, who was employed as a receptionist by security company G4S in February 2003.
At the time of Achbita's recruitment, G4S had an unwritten rule that prohibited employees from wearing visible signs of their political, philosophical or religious beliefs in the workplace, according to the court ruling.
In April 2006, Achbita informed G4S that she intended to wear a headscarf during working hours.
G4S management responded that this would not be tolerated because the visible wearing of political, philosophical or religious signs was contrary to the position of neutrality the company adopted in its contacts with its customers.
In June 2006, Achbita was dismissed because of her continuing insistence on wearing the headscarf at work.
She subsequently challenged that dismissal in the Belgian courts.
In April 2015, the Court of Cassation in Belgium queried the interpretation of the EU directive on equal treatment in employment and occupation, with the ECJ.
The ECJ found that company regulations at G4S that prohibit headscarves at the workplace do not constitute direct discrimination.
"It is not evident from the material in the file available to the Court that the internal rule was applied differently to Ms Achbita as compared to other G4S employees," the EU court said.