“More recently, fanned by misguided but vigorous religious doctrine, the situation has changed dramatically. The ultra-conservative interpretation of Islamic law that prevails in Iran is one example.
“The rampant homophobic teaching that right-wing evangelical Christian churches indulge in throughout much of Sub-Saharan Africa is another.”
He said a “huge gulf” had opened up in attitudes towards gay people.
“It is one of the most demanding social issues of our time. Our own Government has pledged to do what it can to resolve the problem, but it seems likely to grow and to remain with us for many years.”
He said more and more gays and lesbians were likely to have to seek protection here if it was denied in their home countries.
The new Government had already promised to review the policy.
Home Secretary Theresa May said: ”I welcome the ruling of the Supreme Court, which vindicates the position of the coalition Government.
”We have already promised to stop the removal of asylum seekers who have had to leave particular countries because their sexual orientation or gender identification puts them at proven risk of imprisonment, torture or execution.
”I do not believe it is acceptable to send people home and expect them to hide their sexuality to avoid persecution.
”From today, asylum decisions will be considered under the new rules and the judgment gives an immediate legal basis for us to reframe our guidance for assessing claims based on sexuality, taking into account relevant country guidance and the merits of each individual case.
”We will, of course, take any decisions on a case-by-case basis looking at the situation in the country of origin and the merits of individual cases in line with our commitment.”
One of the men involved, known as “T”, appealed against a decision that he could return to his native Cameroon, despite the fact that he was attacked by a mob after he was seen kissing a male partner.
The other, known as “J”, from Iran, was told he could be expected to tolerate conditions arising from his homosexual relationship in his home country, and should behave discreetly to avoid reprisals.
Punishment for homosexual acts ranges from public flogging to execution in Iran, and in Cameroon jail sentences for homosexuality range from six months to five years.
The Supreme Court justices were asked to decide whether a gay applicant could be refused asylum on the grounds that he could avoid ill-treatment by concealing his sexuality.
The Convention on the Status of Refugees provides that members of a particular social group, which can include groups with a common sexual orientation, are entitled to asylum in states that are parties to the Convention if they can establish that they would face a well-founded fear of persecution if returned to their home country.
The Court of Appeal had found that both men could conceal their sexual orientation to avoid the risk of being persecuted and neither had a “well-founded fear of persecution” which entitled them to protection under the Convention.
The Supreme Court justices unanimously found that the test applied by the Court of Appeal was contrary to the Convention and should not be followed in the future.
Both cases will be sent back for reconsideration in light of the guidance provided by the Supreme Court.