A European court has ruled that companies are within their rights to dismiss employees for wearing religious symbols, in a case brought after two women were fired for wearing headscarves.

The European Court of Justice, in a joint judgment on Tuesday, said "an internal rule of an undertaking which prohibits the visible wearing of any political, philosophical or religious sign does not constitute direct discrimination".

Anti-racism organisations in Europe were quick to condemn the decision, with the European Network Against Racism (ENAR) branding it "dangerous" and worrying.

The landmark ruling is the first of its kind from the ECJ, and comes after Belgium's Court of Cassation referred the case of Samira Achbita, a receptionist who was fired for wearing a headscarf to work at security giant G4S in 2006.

Another woman, Asma Bougnaoui, was dismissed from French company Micropole in 2008 after she also wore the headscarf to work. In a similar move, the French Court of Cassation referred the decision to the ECJ.

In the ruling, the ECJ explicitly states that "prohibition on wearing an Islamic headscarf ... does not constitute direct discrimination based on religion or belief within the meaning of the directive".

One of the companies said the women lost their jobs because the company requires "neutral" dress when dealing with customers, or front-of-house roles.

In the ruling, the ECJ stated employers are only able to dismiss employees based on their dress should there be a pre-existing internal ruling on "neutral" dressing.

Companies therefore "cannot" dismiss employees on the basis of clothing should the complaint arise from a customer, the ECJ stated.

ENAR was quick to condemn the ECJ's decision, branding it "dangerous" and saying ENAR is "very worried" about where the ruling could lead.

"This is the worst-case scenario for us because it is giving employers the licence to discriminate against Muslim women," spokesperson Jilly Pascoet told BuzzFeed News.

"This can be applied not only to Muslim women, but other people who follow a religion that requires them to dress a certain way."

Pascoet said it raised a serious of questions about what exactly it meant to be "neutral" in Europe in 2017. "The fact that seeing a Muslim woman wearing a headscarf is not neutral is a real problem," she said. "We believe neutrality is in the service you are giving and the way you doing your job, and not not because of your appearance.

"If it is because of your appearance, then what is it to be neutral in Europe today? That is where we see the danger."

These fears were supported by the Collective Contre Islamophobie en France (CCIF), which said in a statement that the ban carried "serious consequences" and "directly questions the future of the concepts of discrimination and freedom" in Europe.

John Dalhuisen, director of Amnesty International's Europe and Central Asia programme, criticised the “disappointing” ruling which would grant a legal “backdoor” for prejudice and discrimination.

“At a time when identity and appearance has become a political battleground, people need more protection against prejudice, not less,” he said in a statement. “It is now for national governments to step up and protect the rights of their citizens.”

