Image copyright The Naz and Matt Foundation

Nearly half of young LGBT people who are left homeless after coming out are from religious backgrounds.

That's according to research by the Albert Kennedy Trust (AKT), which supports young people who are at risk of homelessness.

Service Manager Leigh Fontaine explains that one in four young homeless people identify as LGBT: "Our research suggests that 77% of those cite familial rejection or abuse as the main cause, and 45% of those identify with a faith background".

The Trust says the majority are from Muslim and Christian families.

For Dr Nazim Mahmood, the pain of not being accepted by his parents ended in the most devastating way.

Five years ago he took his own life when his family told him to "seek a cure" after coming out as gay, because they considered homosexuality a disease.

In reality, so-called "gay-cure" therapies have no scientific evidence to back them up.

In 2018, the government promised to take steps to get rid of the practice in the UK, as evidence shows it is harmful and ineffective.

Strict interpretations of religious texts, from the Bible to the Koran, have been used to argue that being LGBT is a sin.

"He said if his family ever found out that we're together, they'd be praying on the doorstep until we break apart," says his fiance Matt Mahmood-Ogston, who's still dealing with the pain of Naz's death.

'I'm Muslim, is that OK?'

"His smile was incredible, his big brown eyes were so beautiful and the way he spoke. In that moment, my life changed forever."

Love was "instant" when Nazim and Matt met in Birmingham in their early 20s but they soon learned that being in love meant going underground.

One of the first questions Naz asked Matt was: "I'm Muslim, is that OK?"

For Matt it was never a problem but Naz's faith would go on to play a big part in their lives.

Image copyright The Naz and Matt Foundation Image caption Matt says he and Naz were each other's first and only relationship and he will remain in love with him for the rest of his life

To get the freedom and life they wanted, they moved to London and kept their relationship secret for 13 years.

Naz would face constant pressures from his family to get married, and when he revealed the truth during a confrontation at home, he was told to get therapy.

"They were basically saying the thing that he cherished the most - his identity, the most truthful thing about him - had to be got rid of for him to be accepted," Matt says.

Days later Naz took his own life at the age of 34.

If there is any anger or bitterness, Matt doesn't show it.

Through his work - The Naz and Matt Foundation - he wants to help others in a similar position change their family's minds.

Image copyright Getty Images Image caption The Duke of Cambridge said he'd "fully support" his children if they came out as gay, but would worry about the pressures they could face

Last month one of the UK's most high-profile parents moved the conversation forward.

Visiting the AKT in London, the Duke of Cambridge said he would "fully support" his children if they were gay.

"Anyone that may have been on the fence or indifferent, to see the future king say that, would change a lot of minds," says Leigh Fontaine.

AKT, which published a report into LGBT homelessness, works to support anyone who needs help with housing and services.

"People come to us either because they've chosen to leave home due to hostility - from name calling to the extremes of forced conversion, exorcism - or because they've been kicked out."

Do parents ever end up accepting their children?

"Sometimes. The family sees their child grow in independence and confidence once out of the house and their views start to shift and change."

'Dad, I'm gay'

Image copyright Sameer Poselay Image caption Sameer revealed his sexuality while at university and is supported entirely by his family

The idea of telling his family about his sexuality frightened 24-year-old Sameer Poselay.

"I genuinely thought I was going to take the secret to the grave."

He knew he was gay at age eight but with parents of Indian, Sunni Muslim heritage, he says there was a level of expectation: "My parents were really looking forward to having daughters-in-law one day.

"I thought maybe I'd enter a fake marriage as I didn't want to ruin that whole perfect nuclear family. I felt the burden of ruining it."

School - where Sameer says gay people were regularly mocked - didn't help either.

But one night, aged 20, he decided to tell his dad and relieve himself of the burden that had been depressing him for so long.

He'd anticipated being kicked out so had arranged to stay at a friend's.

As his father sat in the lounge absorbed in a TV show, Sameer sat opposite him and said: "I need to talk to you."

Image caption Sameer says he is lucky that his family accept him and accept homosexuality

"Honestly, my immediate thought was 'Oh gosh, I hope you haven't got anyone pregnant'," Sameer's dad Lak Poselay says.

When Sameer eventually said "Dad, I'm gay", there was silence.

"I had a delayed reaction and I just said 'Go on, get on with your life' shrugged my shoulders and said, 'Yeah OK'," says Lak.

Sameer was blindsided, and soon afterwards he got all the reassurances he'd ever wanted.

Crucially, his entire family don't just accept him - they fully accept homosexuality.

"I'm sure some would say I'm not a proper Muslim, but it's simple," Lak says wryly. "You're born a Muslim and you're born gay, so you are both."

Image copyright Sameer Poselay Image caption Sam says growing up he always knew he was "different" and thanks to family support knows his religion and sexuality can both be part of his identity

As for "What will the neighbours think?"...

"I couldn't care less, it's their negativity. I just tell them 'Yes I'm proud my son is gay... and a doctor!'" Lak says.

"I'm a scientist dad," Sameer interjects.

"I know son, but saying doctor is funny because it means more to them doesn't it?"

"And I'm still an Asian dad," Lak laughs. "So I'd like him to bring home an Asian Muslim man!"

There's a serious message he is keen to emphasise.

"As a parent you can literally destroy your child's life because you made something all about you and not wanting to accept it.

"We're all about saving lives - so save your child's life by saying 'OK, you're Muslim and you're gay'."

Image copyright The Naz and Matt Foundation Image caption Naz's bench bears a quote of his and a poem by Matt

It's this full acceptance that Matt says could have meant a different life for Naz.

He places a bouquet of sunflowers on to the memorial bench to honour the man he says will forever remain his soulmate.

They were Naz's favourite kind.

"All Naz wanted was the unconditional love and acceptance of his parents.

"Even if one parent changes their minds after hearing us, it would mean everything."

If you've been affected by any of the issues described in this article, you can find help at the BBC Advice pages.

Clarification 27 August 2019: This article has been amended to include more detailed quotes about the charity's research findings.

Follow Newsbeat on Instagram, Facebook, Twitter and YouTube.

Listen to Newsbeat live at 12:45 and 17:45 weekdays - or listen back here.