LONDON — The European Union’s highest court waded into the politically explosive issue of public expressions of Muslim identity on Tuesday, finding that private employers can ban female workers from wearing head scarves on the job.

The ruling comes as Europe is beginning a critical election season, with races in the Netherlands, France and Germany, and with anti-immigrant, anti-Islam populism rising in many countries. Dutch voters go to the polls on Wednesday, and the far-right party of the anti-Islam politician Geert Wilders is expected to fare well.

In its ruling, the European Court of Justice found that company regulations banning “the visible wearing of any political, philosophical or religious sign” did not constitute direct discrimination — so long as such prohibitions applied to religious garb from all faiths, a requirement that legal experts say could also encompass a Sikh turban and a Jewish skullcap, among other religious symbols.

“It is a very bold step,” said Camino Mortera-Martinez, a research fellow at the Center for European Reform in Brussels, describing the ruling as a landmark decision, if also a political and pragmatic one. “Recently we have seen the court being much more attentive to the political winds rather than being so legalistic, because of the recognition that the E.U. is at risk of collapse.”