Less than a fifth of people in the UK think homosexuality is “morally unacceptable”, the sixth lowest out of 40 countries surveyed.

The Pew Research Centre in the US has published a survey that charts people’s opinions on social issues including same-sex relationships, abortion and extramarital affairs.

It shows 17% of Britons thought homosexuality was immoral – in stark contrast to the most intolerant country Ghana – where 98% of people had the opposite opinion.

A total of 36% of British people surveyed said they felt homosexuality was morally acceptable while the remainder – 43% – said it was “not a moral issue”.

The five countries more tolerant than Britain were Canada, Czech Republic, France, Germany and Spain, where only 6% felt homosexuality was immoral.

In most of the 40 nations polled, half or more of the people said homosexuality was unacceptable. In seven countries, 90% or more said this.