It’s the 21st century, but more than a fifth of the planet’s nations still officially mandate a particular religion and restrict or persecute other faiths, a new Pew Research Center study reveals.

Islam remains the most common official state religion globally, with 27 countries officially Muslim and either outlawing entirely or restricting the practice of other faiths, Pew reported Tuesday.

Katayoun Kishi, the study’s lead researcher, said that her team found a “stronger relationship” between government actions restricting religion and whether the country has an official state religion.

“Countries with an official religion are also more likely to institute bans on one or more religious groups in the country as well as interfere with worship practices,” she added. “This relationship holds true even when controlling for levels of democracy in the country, its population size and the country’s level of social hostilities toward religion.”

Officially Islamic countries are mostly in the Middle East or Africa, but they vary in the zeal with which they tolerate other religions — and even particular Muslim sects, some declaring Shiite Muslims unacceptable, others rejecting Sunni Muslims.

For example, Saudi Arabia strictly mandates Sunni Islam and makes conversion from Islam grounds for charges of apostasy, for which the maximum penalty is death. (The death penalty also is legal for atheism in Saudi Arabia.)

Other officially Islamic nations, such as Iran, allow some non-Muslim religious practices but prohibit proselytizing or public displays of non-Muslim worship — again with the death penalty possible.

In Jordan, while officially Islamic, converts from Islam to Christianity may be questioned and otherwise scrutinized by security forces, but registered non-Muslim faiths are allowed to own tax-exempt property and practice their religious rites.

Pew found that 13 countries, nine of them in Europe, designate Christianity, or a particular denomination of that faith, as the official religion of the land. Generally, that status is largely ceremonial, though in some former Soviet bloc, Orthodox nations, restrictions other other faiths — including Christian sects — can be oppressive.

Globally, 22 percent of the 199 countries studied had an official state religion. While Islam and Christianity accounted for 40 of those, two others — Bhutan and Cambodia — are officially Buddhist, while Israel embraces Judaism.

India’s constitution protects religious freedom, but is dominated by a powerful Hindu party, and clashes between Hindus and adherents of other faiths — including Islam and Christianity — intermittently break out.

The majority — 106 countries, or 53 percent of those studied — have “no official or preferred” religion. That tally ranges from the United States, where freedom of, and from, religion is enshrined, to France, where no particular faith is favored, but where researchers still noted a “high level” of government restrictions on religion in public venues.

Pew deemed 10 nations officially “hostile” to religious expression in general: Communist China, Vietnam, North Korea, Cuba and the former Soviet republics of Azerbaijan, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan and Uzbekistan.

In those former Soviet bloc nations, many leaders have publicly embraced Islam, even as their governments continue to monitor mosques and Muslim clergy.

Under Russian law, Christianity, Judaism, Islam and Buddhism officially are deemed the country’s “traditional” religions, Pew noted. However, in practice, Moscow has a record of showing preference for the Russian Orthodox Church, providing security and access to official vehicles to Orthodox leaders, and presidential grants to organizations either controlled by or with ties to the church.

In recent years, that preference has become more open, both nationally and locally, with Russia scrutinizing such non-Orthodox “Western” sects as the Utah-based Church of Jesus Christ of Latter-day Saints and the Jehovah’s Witnesses.

Mormon missionary activity has been tightly restricted, with the LDS Church now referring to its young spiritual ambassadors as “volunteers.” Jehovah‘s Witnesses have been virtually banned outright, with police raids on meetinghouses and even private residences reported.

When it comes to the more loosely defined category of nations “favoring” a particular religion, Pew researchers found 40 such countries — 28 of them leaning toward Catholicism or Orthodox Christianity.

Researchers further found that citizens of Central and Eastern European nations with official state religions generally identify faith with their national identity as much as personal spirituality.