Image copyright Colin Boyd Shafer Image caption Garrard Conley was forced to go through "gay conversion therapy" as a teenager

It's not unusual for a writer to dedicate a book to their parents - but for Garrard Conley to have dedicated Boy Erased to his mother and father and thanked them in the acknowledgements is more surprising, given that it is all about what they put him through.

They are the ones who told him he had to go through "gay conversion therapy" or leave the family forever.

Conley had been outed to his parents by his rapist after being assaulted in college. But, to his Baptist preacher father and his mother, the crime was in him being gay.

They lived in Arkansas, in Bible belt southern US, where it was taught that yoga is wrong and Harry Potter is evil. Conley, both terrified of (and conflicted by) his sexuality, felt at the time there was only one solution - to go through with the controversial practice.

"I had believed there were actual demons possessing me," Conley tells BBC News. "I had lived 18 years of my life in this almost cultish environment. It was cult-lite."

The programme he was sent to was "a full-on cult", he says, but he found the strength to break out of it and the path his family expected him to take.

He went on to study queer theory and is now living with his husband in New York, having written of his experiences in Boy Erased.

Now a film is being made of that memoir by actor and director Joel Edgerton, with Lucas Hedges starring as Conley. Russell Crowe and Nicole Kidman will play his parents, with Troye Sivan starring as another victim of conversion therapy.

'I was in freefall'

"I waited 10 years before I wrote a word of the book," Conley explains. "I was so worried about looking stupid - I felt everyone was already judging my background, the fact I had believed these things.

"I was really minimising the whole experience. To me it felt normal, like, 'That was a crazy thing that happened'. But then, I read some blog entries saying that people were suffering and I began to recognise some of those symptoms in myself - sometimes, I couldn't touch my partner without feeling shame."

He set out to write about his experience in what he calls a three-part story - of him, his parents and the counsellors at the centre that was supposed to "cure" him of being gay.

Image copyright Getty Images Image caption Lucas Hedges with Joel Edgerton, right, who has written the screenplay for Boy Erased, which he also has produced and directed

But why did he agree to the "therapy"?

"I was in freefall from being raped, and having the rapist say he had also raped a 14-year-old boy," he says - adding that he was also brought up to believe gay people were perverts.

"And then my dad gave me the ultimatum. I was terrified of losing God. I prayed every night.

"My parents had some hope I could have a 'normal' life - I'd dated a girl for two years. I did love her in many ways, and she'd protected me. So, I thought, 'Well, there's just this sex thing - what does that matter?'"

'My parents had no idea'

He went through a 12-step programme, with a focus on Bible study, that was meant to see Conley leave the facility as a straight man, "cleansed" of his "impure" thoughts.

There were rules about how to behave and look during the intense two-week "therapy". Conley had his phone taken from him and was told all photographs and messages would need to be read.

The experience - those two weeks, and then six months of one-to-one therapy - left him close to suicide.

"You didn't question these leaders," he says. "So my parents never knew what went on there until I told them, many years later.

"They had no idea what was going on. My mum had started asking questions at the end, and that's when they'd taken me out of the programme. We weren't meant to talk about what happened in there.

"Yes, my parents made a terrible mistake which could have cost me my life. But they didn't know what they were doing to me.

"It's why I do this advocacy work. It's so important for people who may be considering this for their own kids."

Image copyright Getty Images Image caption Russell Crowe and Nicole Kidman star in the film as Conley's parents

Even when his mother read Boy Erased, Conley says "she didn't know everything".

"I didn't give them early copies," he admits. "My mum downloaded it the minute it came out. She was so worried she would be embarrassed and it would be a screed against them.

"So it was actually a relief to her. But my dad claims he hasn't read it - which I don't think is possible."

Conley adds of his father: "We still have disagreement on LGBT issues. He thinks it's a choice. And he has a congregation who, if he came out in support of me, would leave his church.

"He doesn't preach against LGBT issues. I'd say he's moved on."

'It's my story'

But he says that by refusing to attack his parents, he has been criticised by some who say he has been humanising them too much.

"My response is that it's my story, and I get to choose how I feel," he says. "One of the things that really annoyed me about conversion therapy is that I was meant to hate my father.

"I feel the same about things people say on Twitter - don't tell me how I feel about my father. I have three-dimensional feelings."

Joel Edgerton, fascinated by Conley's story, wrote the screenplay for the film - which he also produced, directed and stars in. It's due out in September in the US.

And while Crowe was researching the film, the Hollywood star turned up to Conley's father's church unannounced.

"Russell Crowe visited the church and then he and my dad texted for weeks. It's added a level of scrutiny to their lives which wasn't there when the book came out [it was released in the US in 2016, two years before its UK publication this month].

"They can't go to the Post Office now without someone mentioning Russell Crowe."

He says the film being made has been "nerve-racking", but adds: "Joel made this his passion project.

"From when I sat down with him, he wanted to speak to other survivors of conversion therapy. I thought, 'This is someone who cares'. And when I sat down with Lucas Hedges, he had marked every page of the book.

"I've seen the film a few times and it's so true to the book. It's not sensational at all. I don't feel it got the Hollywood treatment."

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.