In recent years, same-sex marriage has been legalized in some parts of the United States and in 15 countries worldwide, in part because of the public’s changing views about the subject and because of increasing acceptance of homosexuality. But these shifts aren’t universal. When the Pew Research Center surveyed the publics in 39 countries this year about views of homosexuality, we found a polarized world, with broad acceptance of homosexuality in North America, the European Union and much of Latin America and equally widespread rejection in predominantly Muslim countries and in Africa, as well as in parts of Asia and Russia.

We also found a strong relationship between a country’s religiosity and opinions about homosexuality, with far less acceptance in countries where religion is central to people’s lives. Russia is a clear outlier, where there is less acceptance of homosexuality than the country’s low level of religiosity would suggest, and Brazil and the Philippines, where people are far more accepting than one might expect given their relatively high levels of religiosity.

The link between religiosity and acceptance of homosexuality explains, at least in part, why acceptance of homosexuality among Americans is low relative to other wealthy countries, particularly Canada and Western European nations, where religion is less central to people’s lives than in the U.S. Fully 60% of Americans say homosexuality should be accepted by society, compared with 88% in Spain, 87% in Germany, 80% in Canada, 77% in France, 76% in Britain and 74% in Italy.

Half of Americans consider religion to be very important in their lives, compared with 30% or less in Canada and Western Europe. In Britain and France, fewer than one-in-five say religion is very important to them (17% and 13% respectively).

When asked how often they pray outside of attending religious services, far more Americans than Canadians and Western Europeans say they pray at least once a day. And while more than half of Americans say it is necessary to believe in God in order to be moral and have good values, solid majorities in France (85%), Spain (80%), Britain (78%), Italy (71%), Canada (67%) and Germany (66%) say this is not the case.

Here are more detailed results on global views of homosexuality and survey methodology.

Updated May 27, 2014: The original version of this report included public opinion data on the connection between religion and morality in China that has since been found to have been in error. Specifically, the particular survey item that asked whether one needed to believe in a higher power or God to be a moral person was mistranslated on the China questionnaire, rendering the results incomparable to the remaining 39 countries. For this reason, the data from China has been removed from the current version of the report, re-released in May 2014.

For further information, please contact info@pewresearch.org.