Restrictions against religious groups in the world’s 25 most populous countries — where more than 5 billion of the globe’s roughly 7.5 billion people live — vary greatly, from some of the lowest in the world (Brazil and Japan) to among the very highest (Russia and Egypt).

In addition to Russia and Egypt, India, Pakistan and Nigeria also had some of the highest levels of religious restrictions among this group of most populous countries, according to Pew Research Center’s latest annual study on the topic, which uses 2015 data (the most recent year available). In these countries, the government or society at large (or, at times, both) imposed numerous limits on religious beliefs and practices.

In India, for example, some state governments restricted religious conversion and others banned cow slaughter. (Many Hindus view cows as sacred, so these laws may disproportionally affect the minority Muslim population, as well as other non-Hindus.) India had an even higher level of social hostilities involving religion, which are perpetrated by individuals or groups in society, rather than the government. The Indian government estimated that there were 561 incidents of communal violence between January and October in 2015; these incidents resulted in 90 deaths and 1,688 injuries. In one of the incidents, a mob attacked a Muslim man for speaking with his female Hindu coworker, according to the U.S. State Department.

Egypt had the highest level of religious restrictions imposed by the government. For example, the Egyptian government “failed to protect Christians targeted by kidnappings and extortion,” the State Department reported, a sign that a lack of security for Egypt’s Coptic Christian community was an issue long before the ISIS bombings at two churches in Egypt on Palm Sunday this year.

Russia’s government restrictions on religion also were classified as “very high” – and increased modestly from 2014, due in part to an anti-extremism law that was used to impose limits on the activities of Muslims and other minority religious groups, including Jehovah’s Witnesses.

Meanwhile, Nigeria had the highest level of religion-related social hostilities of the 25 most populous countries – in part because of the actions of Boko Haram, the extremist group based in the northeastern part of the country. Boko Haram reportedly killed thousands of people in 2015, in both “indiscriminate acts of violence and attacks deliberately targeting Muslims who spoke out against or opposed their radical ideology … as well as Christians,” according to the State Department. In addition, Muslims and Christians – each of whom make up nearly half of the Nigerian population – reported discrimination based on their religious affiliation in areas where they were the minority, including threats of violence if they changed or abandoned their faith.

Among the most populous countries, Egypt and Russia were the only ones to be among the top five in both government restrictions and social hostilities. Government restrictions and social hostilities are not necessarily correlated: In some places there are high restrictions and hostilities, but in others, such as China, some of the highest levels of government restrictions in 2015 were accompanied by moderate levels of social hostilities.

Not all of the 25 most populous countries reported high levels of government restrictions on religion. Several of them, including Brazil, Japan, South Africa and the Philippines, had low levels. But when it comes to social hostilities, none of the 25 most populous countries fell into the “low” category globally, perhaps indicating that large populations carry an inherently greater risk of incidents of social hostilities involving religion, simply because there are more people.

For details on the sources and methodology of this analysis, and to explore an interactive showing changes in restrictions in the world’s 25 most populous countries from 2007-2015, see the full report.