A study published in the American Journal of Preventive Medicine last month found a link between religiosity and suicide among gay and questioning participants.

The study used data from the 2011 University of Texas at Austin’s Research Consortium, which surveyed 21,247 18- to 30-year-olds. 2.3% identified as gay or lesbian, 3.3% as bi, and 1.1% were questioning.

LGBQ youth reported that they had attempted suicide at least once in their lives at a higher rate than straight people. 5% of straight people said that they had attempted suicide, while the rates for LGBQ youth ranged from 14% to 20%.

While studies have already shown that queer youth are more likely to have attempted suicide, this study went a step further and asked participants to rate the importance of religion in their lives.

Gay and lesbian youth who said that religion was important to them were 38% more likely to report recent suicidal thoughts compared to gays and lesbians who said that religion wasn’t important to them.

The difference was more stark for questioning youth – they were three times more likely to report recent suicidal thoughts if they were religious.

Religiosity was not correlated with suicidal thoughts among bi youth, who reported high rates of suicidal thoughts no matter their religiosity.

For straight people, the correlation was the opposite: they were less likely to report suicidal thoughts if they were religious.

“Religion has typically been seen as something that would protect somebody from thoughts of suicide or trying to kill themselves, and in our study our evidence suggests that may not be the case for everyone, particularly for those we refer to as sexual minority people,” said John Blosnich of West Virginia University, one of the study’s authors.

“It can be very scary to be caught in a space where your religion tells you that you are a ‘sinner’ just for being who you are,” he said. “Sexual minority people may feel abandoned, they may experience deep sadness and anger, and they may worry what this means for their families ― especially if their families are very religious too.”

The study did not ask participants what their religion was, so there isn’t any data to show whether more supportive religions were less correlated with suicidal thoughts.

The authors conclude that faith-based suicide prevention services “should be willing and equipped to assist all people who seek their services, regardless of sexual orientation.”

The problem is that the “gay condemning” parts of a religion cannot be separated from the “suicide preventing” parts. Religious conservatives often say that they are appalled by suicide and want to help queer people, and they imagine that they can be supportive of LGBQ people while still condemning homosexuality.

That’s not how it works, but a lot of religious people aren’t willing to change their opinions, even when people’s lives literally depend on it.