Homosexuality is broadly accepted in North America, the European Union and much of Latin America, but widely rejected in predominantly Muslim nations and Africa, as well as in parts of Asia and Russia, according to a survey of 39 countries released Tuesday by the Pew Research Center.

This survey is the first in a series focused on LGBT issues that the center will release in the coming weeks ahead of the U.S. Supreme Court’s ruling on same-sex marriage. The series will include a detailed survey of the American public and the center’s first-ever survey of the LGBT community.

The view that homosexuality should be accepted by society is prevalent in most of the EU countries surveyed, with 88 percent in Spain sharing this view. Outside of Europe, it is accepted by about three-quarters or more in Canada (80 percent), Australia (79 percent), Argentina (74 percent) and the Philippines (73 percent). A smaller majority (60 percent) believes homosexuality should be accepted in the United States.

In sub-Saharan Africa, at least nine-in-ten in Nigeria (98 percent), Senegal (96 percent), Ghana (96 percent), Uganda (96 percent) and Kenya (90 percent) believe homosexuality should not be accepted by society.

Overwhelming majorities in the predominantly Muslim countries surveyed also say homosexuality should be rejected, including 97 percent in Jordan, 95 percent in Egypt, 94 percent in Tunisia and 93 percent in the Palestinian territories.

Elsewhere, majorities in Russia (74 percent), South Korea (59 percent) and China (57 percent) also say homosexuality should not be accepted by society.

In most countries, attitudes about homosexuality have been fairly stable in recent years. The exceptions are South Korea, the United States and Canada, where the percentage saying it should be accepted has grown by at least ten percentage points since 2007.

The survey, conducted from March 2 to May 1 among 37,653 respondents in 39 countries, also finds:

There is far less acceptance of homosexuality in countries where religion is central to people’s lives, but there are some notable exceptions. Russia and China receive low scores on the religiosity scale, but just 16% of Russians and 21% of Chinese say homosexuality should be accepted by society. Conversely, Brazilians and Filipinos are considerably more tolerant of homosexuality than their countries’ relatively high levels of religiosity would suggest.

In many countries, younger respondents are more likely than older ones to say homosexuality should be accepted by society. Age differences are particularly evident in South Korea, Japan, and Brazil, where those ages 30-49 are less accepting than those younger than 30 but more accepting than those ages 50 and older. Solid majorities across age groups in Africa and predominantly Muslim countries say homosexuality should be rejected by society.

In most of the countries surveyed, views of homosexuality do not differ significantly between men and women. But where there is a gender gap, women are considerably more likely to say homosexuality should be accepted by society. In Japan, Venezuela and Greece, where about six-in-ten women say homosexuality should be accepted, fewer than half of men share this view.

The full survey is available here.