Four years of Pope Francis notwithstanding, it remains generally true in Europe that the more overtly Catholic a political party is, the more likely it is to advocate a restrictive line on immigration.

That’s the case with the Law and Justice party in Poland, for instance, as well as Viktor Orbán’s Fidesz party in Hungary, which puts great stock in its Catholic support despite the fact Orbán himself is a Calvinist.

There are several reasons why culturally conservative Catholics tend to be skeptical about immigration, with security and the fear of terrorism being near the top of the list. Another major factor, however, is that a disproportionate share of migrants and refugees seeking to enter Europe today are Muslims, raising anxiety about the Christian roots of Europe, already badly frayed by centuries of intense secularization.

That’s what led then-Cardinal Giacomo Biffi of Bologna, for instance, to suggest in 2000 that Italy restrict Muslim immigration and give preference to Catholic migrants.

“I don’t know how you’re going to cope with Friday as a holiday, polygamy, discrimination against women and the fundamentalism of Muslims, for whom politics and religion are the same thing,” Cardinal Biffi said at the time.

Cardinal Biffi died in 2015, but he’s hardly the only important Catholic figure thinking along those lines.

Certainly the desire to preserve the identity of traditionally Christian and Catholic societies is legitimate as far as it goes, but a story out of Denmark illustrates an important dose of caution, to wit: Sometimes measures intended to curb the influence of Islam, especially its more radical forms, can end up boomeranging against other religions, too, including the Catholic Church.

Denmark may be one of the world’s most thoroughly secular cultures, but it nevertheless takes religion seriously. It’s got a Ministry of Ecclesiastical Affairs, and the established Lutheran Church receives about $1.3 billion in state support every year. (The average Dane, according to government figures, will pay around $20,000 in a “church tax” over the course of their lifetime.)

Part of the regulation of religion in Denmark is a provision for official recognition of a religious denomination, which comports a number of privileges:

> The right to perform marriage ceremonies with civil effect.

> The right to residency permits for foreign clergy under the Danish Aliens Act.

> The right to receive tax-exempt contributions.

> Other tax benefits.

> The right to establish and operate cemeteries.

Legal recognition of the Catholic Church in Denmark dates to 1682, part of a series of privileges granted by King Christian V to the town of Fredericia, driven by a desire to attract merchants and craftsmen from the rest of Europe to the city, even though religious freedom wasn’t officially extended to the rest of the country until 1849.

A draft amendment to the procedure for registration of religious groups up for consideration this fall would insert a requirement that the governing body of a recognized denomination must be democratically elected. It’s motivated to a large extent by a desire to prevent Islamic radicals from taking control of the country’s mosques, ensuring the selection of leadership is transparent and not driven by foreign — read Saudi — money and influence.

Roughly 270,000 Muslims now live in Denmark, a little under 5 percent of the total population, and their presence has caused deep unease. Over the last decade, the country has imposed some of the world’s most restrictive immigration policies, a line supported in broad strokes by both the political right and left. (Among other things, the Social Democrats belatedly have recognized that an open-door policy is fundamentally incompatible with paying for a social welfare state.)

In that context, the new registration law is a natural extension of Danes’ concerns over security, national identity and preserving their way of life.

However, the requirement is also obviously problematic for the Catholic Church, which does have elected parish and diocesan councils, but they’re merely advisory, while actual governance lies in the hands of the pastor and the bishop.

I was in Denmark this week, along with my colleague Inés San Martín, where Bishop Czeslaw Kozon (the lone bishop in a country with a total Catholic population estimated at just 45,000 souls, the majority foreign-born) explained to us that in response to Catholic concerns, the draft law explicitly states that the new requirement for elected leadership cannot compel the Catholic Church to change its teachings on women priests and gay marriage.

Yet Bishop Kozon acknowledged a degree of anxiety that, over time, such tolerance might evaporate.

“I could easily imagine that in some years, these teachings could be seen as incompatible with so-called ‘Danish values,’” he said, at which point the state could actually attempt to force the Church to abandon them or face legal consequences.

We saw this week another chapter in secular intolerance of religion when Tim Farron, the former leader of Britain’s Liberal Democrats, felt compelled to resign in the face of relentless hounding from the media about his religious beliefs.

That’s hardly an unprecedented development in European politics. In 2004, for instance, the nomination of Italian politician Rocco Buttiglione as the Minister of Justice, Freedom and Security had to be withdrawn because of his private opposition to abortion and gay marriage, even though Buttiglione repeatedly insisted those views would not be part of his agenda as a public figure.

At the time, Buttiglione referred to the forces opposed to his nomination as a form of “soft totalitarianism,” and there’s scant evidence that the climate for religious believers in European public life has improved in the 13 years since.

In such a deeply secular environment, in which religious faith is de facto often seen as suspect, new restrictions on any religion can easily become problems for all. Religious freedom is likely to be the next great human rights battleground in Europe, and Christians and Muslims alike may well find themselves in the same boat.

For Catholics concerned about the impact of rising levels of Muslim immigration in Europe, and instinctively supportive of efforts to limit the influence of Islamic radicalism, perhaps the lesson out of Denmark is this: Be careful what you wish for, because you just might get it.

This article originally appeared at the Catholic news site cruxnow.com