The advent of gay marriage has cut suicide rates among lesbians and gay men in Sweden and Denmark - but, divorced, widowed or married, homosexuals are still more prone to suicide than their straight peers, according to a study released on Thursday.

The researchers said reduced stigma for sexual minorities was likely driving the drop in deaths, culled from official data on thousands of same-sex couples in the two countries, both early adopters of gay marriage.

"Being married is protective against suicide," said Annette Erlangsen of the Danish Research Institute for Suicide Prevention.

"Legalising same-sex marriage and other supportive legislative measures - they might actually reduce stigma around sexual minorities," said Erlangsen, the lead author of the study.

Suicides of people in same-sex unions fell 46% when researchers compared two periods - 2003 to 2016 and 1989 to 2002 - versus 28% among heterosexual couples, according to the paper published in the Journal of Epidemiology and Community Health.

Same-sex married people still killed themselves at more than twice the rate of those in opposite-sex marriages in both periods, reinforcing research from other countries that points to a higher incidence of suicide attempts among LGBT+ people.

In 1989, Denmark became the first country in the world to allow same-sex civil unions; Sweden followed suit in 1995.

Gay marriage was legalised in Sweden in 2009 and Denmark in 2012, with both nations seen as global leaders for LGBT+ rights.

Same-sex marriage is legal in 27 countries, 16 of them in Europe. Ecuador became the latest nation to introduce it in June.

Young LGBT+ people are at least three times more likely to attempt suicide than their straight peers, according to 35 studies from 10 countries collated by researchers in 2018.

Legislation that promotes LGBT+ rights may reduce the risk of suicide - even for those who are not yet old enough to wed.

Suicide attempts by U.S. high school students dropped 7% in states with legal same-sex marriage, a 2017 study by Harvard University found, and 14% among students who identified as lesbian, gay or bisexual.

Erlangsen's study, which tracked more than 28,000 people in same-sex unions for an average of 11 years, found married lesbians were 2.8 times as likely to die by suicide as women in heterosexual unions and slightly more likely than straight, married men.

Men in gay partnerships were most likely to kill themselves.

"There still remains a considerable degree of homophobia, particularly against male homosexuals," said Morten Frisch, of Denmark's Statens Serum Institut, a research body.

"Just under one in three men still consider it morally unacceptable that two men have sex with each other," he said, citing a survey of more than 62,000 Danes released in October.