IT IS a problem that arises in every liberal democracy that upholds liberty of belief (and hence, the freedom of religious bodies to manage their own affairs) while also aiming to defend citizens, including job-seekers, from unfair discrimination. As part of their entitlement to run their own show, faith groups often claim some exemption from equality laws when they are recruiting people.

To take an extreme case, it would run counter to common sense if a church were judicially obliged to appoint a militant atheist as a priest, even if that candidate was well qualified on paper. But how generous should those exceptions be?

In recent years some decisions by the American Supreme Court and the European Court of Human Rights (ECHR) have been pretty kind, as many people would see things, to religious employers. In 2012 a teacher laid off from a school linked to a Lutheran church in Michigan lost her unfair dismissal case on the grounds that she was technically a minister and her bosses were therefore exempt from equality laws. And in 2014 the ECHR vindicated the Spanish Catholic church after it effectively ended the teaching career of a priest who had married and joined a campaign against clerical celibacy rules. (The ECHR is an organ of the 47-nation Council of Europe and enforces its convention on human rights.)

But this month, a ruling by the European Court of Justice (ECJ, pictured), which adjudicates the law of the 28-nation European Union, tilted in the other direction. It issued a pronouncement that will make it somewhat harder for faith-affiliated bodies, such as charities or colleges, to favour their own adherents, at least when hiring for jobs of a fairly secular type.

The latest case arose because a German woman who happens to be a well-qualified expert on human rights and equality was offered no interview when she applied for a post with a Protestant-affiliated NGO. On the face of things, she was cut out for the job, which involved writing a report on Germany’s compliance with a UN convention on racism. But she failed to meet one of the specifications; that the candidate must belong either to Germany’s powerful Evangelical Lutheran Church or at least to one of the denominations in a certain association of churches.

Vera Egenberger, who adheres to no church, felt the requirement was unreasonable and complained to her country’s Federal Labour Court. The court, in turn, felt torn between two almost irreconcilable legal norms: the religious freedom laid down in Germany’s constitution and laws, and the equality directives of the EU. So the German court turned to the ECJ for help.

The ECJ’s response, delivered in Luxembourg on April 17th, came as quite a jolt for law-and-religion buffs. It broadly implied that Germany’s national law was too generous to religiously affiliated employers, which control more than 1m jobs in the country. The law virtually allows faith-minded bosses to decide for themselves which posts carry an “occupational requirement” which is so strong that the ethos of their religion would be compromised if a person of different beliefs were hired. Through a tangle of dense legal language, the ECJ opined that this national law made things excessively easy for religious recruiters.

Any claim of an “occupational requirement” should be subject to judicial challenge, and the onus was generally on the employer to show why it was objectively necessary to impose a faith test, in the ECJ’s view. It added that German courts should do their best to abide both by national law and that of the EU, but if that proved impossible they should adhere to the latter.

As was noted by Marco Ventura, a canon law professor and fellow of Italy’s Bruno Kessler Foundation, the ruling deals a blow to religious organisations which had looked for a “safe haven” from pan-European equality norms. Faith groups have placed their hopes on Article 17 of the EU’s founding treaty which recognises the reality that different member countries have different religious regimes and pledges not to interfere.

But the newly issued ruling stresses that some other very important axioms are at stake: for example, article 21 of the EU’s charter of fundamental rights which bars discrimination on grounds of gender, race, religion or sexual orientation.

As Mr Ventura adds, religious groups in Western countries have up to now managed to carve out an area of exemption by convincing some judges that devoting one’s life to a faith-based institution is not employment in the usual sense but rather a kind of disinterested vocation. (That helps to explain why the ECHR vindicated the Romanian Orthodox church in its refusal to recognise a priests’ trade union.)

Vocation might be an accurate description for some people who feel a deep impulse to profess and live out a certain faith; but as the new ruling implies, this idea should not be abused to make millions of more or less worldly jobs (involving say, clerical work or the distribution of aid) subject to a faith test.