People living in wealthy countries are less likely than those in emerging economies to say that belief in God is necessary to be moral.
The Pew Research Center examined attitudes towards God and morality across 34 countries and found that beliefs vary according to economic development.
Overall, nearly half (45%) of the 38,426 people surveyed said it was necessary to believe in God to be moral and have good values.
Across all the countries surveyed, 62% of respondents said that religion was very or somewhat important to their lives, while 61% said that God played an important role in their lives. Over half (53%) said the same about prayer.
There were considerable regional variations, with respondents in emerging economies tending to be more religious and more likely to regard religion as important to their lives.
Within countries, the survey revealed that those who see themselves as relatively non-religious are more likely than their highly religious fellow countrymen to say that belief in God is not necessary to be a moral person.
People in Indonesia and the Philippines were most likely to connect belief in God with having good values (96% each), followed by Kenya (95%) and Nigeria (93%). Over three quarters in India (79%), Turkey (75%) and Tunisia (84%) felt the same.
By contrast, only a quarter of Canadians (26%) and less than half of Americans (44%) agreed that belief in God was necessary to be moral.
Most Western European countries were also dismissive of any link between belief in God and morality, with only a fifth of respondents in the UK regarding it as important, and only 15% of French. In Sweden, the number of respondents who linked belief in God with morality was less than one in ten (9%).
Out of the 14 EU countries surveyed, Greece was the most likely to tie belief in God to morality (53%), followed by Bulgaria (50%) and Slovakia (45%).