Under some situations, employers may prohibit Muslim workers from wearing headscarves, the European Union’s (EU) highest court said on Thursday, in two lawsuits filed by Muslim women in Germany who were fired after they decided to wear the Islamic apparel.

Also Read: Sri Lanka to ban burqa and shutdown Islamic Schools

“A restriction on bearing any apparent form of expression of political, philosophical, or religious ideas in the workplace may be warranted by the employer’s duty to create a neutral image to consumers or to avert social conflicts,” the court stated.

“However, that reasoning must correlate to a legitimate need on the part of the employer, and, in reconciling the rights and interests at issue, national courts may account for the fact the specific context of their Member State, including more preferable national provisions on the safety of religious freedom.”

Both Muslim women – a special needs caregiver at a nonprofit association-run childcare facility in Hamburg and a cashier at the Mueller pharmacy chain – did not wear hijabs when they began their employment, but did so years later after returning from maternity leave.

According to court records, they were warned by their individual employers that this was not permitted and were either terminated, ordered to come to work without it, or assigned to a new position at various stages.

Read More: پاکستان اور امریکا محفوظ افغانستان چاہتے ہیں: ترجمان امریکی محکمہ خارجہ

For years, the topic of the hijab – the traditional headscarf worn all across head and shoulders – has generated debate across Europe, highlighting deep divides about integrating Muslims.

The EU court in Luxembourg previously stated in a 2017 judgement that firms may prohibit employees from adopting Islamic hijabs and other conspicuous religious symbols under certain situations. This provoked a significant outcry among religious groups at the time.