The Court of Justice of the European Union has allowed a qualified ban on religious headscarves in the workplace, following the case of a receptionist who was fired for wearing a hijab to work.

“Nobody should be forced to choose between their religion and their profession,” said Adina Portaru, legal counsel for Alliance Defending Freedom International in Brussels. “A court claiming to be a champion of human rights should safeguard the fundamental right to freedom of conscience, religion, and belief rather than undermining it. Citizens’ deeply held convictions should be reasonably accommodated by their employers.”

The court ruled that it is not directly discriminatory for a workplace to ban “any political, philosophical or religious sign.” Any ban must be based on internal company rules requiring neutral dress.

Samira Achbita, a receptionist working at the 4GS security company in Belgium, filed the suit. She was fired in 2006 when she began to wear a headscarf to work after three years of working at the company, BBC News reports.

The company had followed an “unwritten rule” against overt religious symbols. It later made the rule explicit. The rule covered “any manifestation of such beliefs without distinction.”

The court said a neutral rule would include a ban on crucifixes, skullcaps and turbans.

For Portaru, the decision is “highly problematic.”

“It ultimately allows private businesses to implement rules which violate the fundamental right to freedom of religion,” she said. “It is the court’s duty to accommodate different convictions and beliefs rather than force a so-called neutrality.”

At the same time, the European Court of Justice said that national courts should determine that there is no particular disadvantage for people of a particular religion or belief unless it is “objectively justified by a legitimate aim” and workplace practices follow “appropriate and necessary” practices.

It said the Belgian court would have needed to determine whether Achbita could have been offered another position not in sight of customers.

The court rejected specific treatment of religious individuals based on a customer’s complaint, as in a French case where a firm allegedly fired a design engineer after a customer complained about her Islamic headscarf.

Some forms of religious expression in Europe face legal penalties. A ban on teachers wearing the headscarf was ruled unconstitutional in a German court in 2015. In Austria and the German state of Bavaria, full-face veils are banned in public.

In 2013, four Christian British Airways employees won a legal case in the European Court of Human Rights, which ruled their employer engaged in illegal discrimination for telling them they could not wear their crosses.