Europe's top court has ruled that employers can ban staff from wearing a headscarf.

The European Court of Justice ruled Tuesday on a case concerning two Muslim women who were fired for refusing to remove their headscarves.

The court said companies should be able to ban the wearing of any visible political, philosophical or religious signs. A ban on headscarves did not constitute direct discrimination, as long as a general ban on other symbols was in place, it said.

The case was heard by the grand chamber of 15 judges at the court in Luxembourg. It ruled that companies may have a legitimate right to want to appear neutral in front of their customers, and could therefore ask their staff to dress neutrally.

Headscarves could not be banned, however, in response to a request from a customer, it added.

In the first case of its kind, the court touched on an issue that has become a flashpoint across Europe. Debates about Muslim immigration and integration have dominated election campaigns in France and the Netherlands.

Nike has a new product for Muslim women: The 'Pro Hijab'

The Muslim women -- a receptionist working at security firm G4S in Belgium and a consultant at Micropole in France -- had taken their cases to national courts, who then referred the matter to the ECJ.

CCIF, a French organization that campaigns against Islamophobia, said the court's decision "condemns Muslim women to an economical and social death."

"This decision is not based on a logic of promoting fundamental rights, but rather on the tensions running through certain parts of European societies," it said in a statement.

Related: U.S. does $220 billion in trade with Muslim countries

G4S is one of the biggest private sector employers in the world, with more than 600,000 workers around the world.

The company said its policies in Belgium are supported by employee representatives and have been upheld in the Belgian courts.

"There is a long-standing custom in Belgium for organizations with diverse workforces to apply a policy of religious and political neutrality, especially where the organization has staff who have contact with the public," G4S said in a statement.

It said it applies different rules across different countries, depending on local customs.

"In many countries such as the U.K. where there is no strong tradition of religious and political neutrality, G4S permits the wearing of religious dress such as Islamic headscarves."

-- CNN's Maud Le Rest in Paris and Sebastian Shukla in Brussels contributed reporting.

Editor's note: Are you affected by today's ruling? You can WhatsApp us on +1347-322-0415.