Some of her gay friends were sent to gay ‘conversion therapy’.

Miley Cyrus has revealed that she left her old church in Tennessee over the way it treated gay people, including sending some of her gay friends to ‘conversion therapy’ centres.

Speaking alongside model Hailey Bieber, formally known as Hailey Baldwin, on Bright Minded: Live with Miley, Miley discussed having a “hard time” navigating her religion so it worked for her and her sexual identity.

Speaking about her experiences growing up, Miley said: “I was also brought up in the church in Tennessee at a time in the ’90s, so it was a less accepting time with all that.

“I had some gay friends in school. That is the reason why I left my church is that they weren’t being accepted. They were being sent to conversion therapies. And I had a really hard time with that and I had a hard time with me finding my sexuality too.”

She added: “So I think now you telling me that I’m allowed to redesign my relationship with God as an adult and make it how it feels most accepting to me would make me feel so less turned off by spirituality.”

Miley identifies as pansexual, however, she came under fire last year when during an Instagram Live with her boyfriend, Cody Simpson, she seemed to imply that being gay was a choice.

Shortly after, Miley released the following statement to Twitter and Instagram: “I was talking shit about sucky guys. But let me be clear, YOU don’t CHOOSE your sexuality. You are born as you are.

“It has always been my priority to protect the LGBTQ community I am part of.”

Gay ‘conversion therapy’, which has been discredited by the NHS and the World Psychiatric Association, refers to any attempt at changing a person’s sexual orientation or gender identity, and often involves techniques like electroshock therapy or prayer.

The practice is still legal in almost all countries in the world, including the United Kingdom, however countries like Germany and Canada have pledged to take action against it.

Canadian Prime Minister, Justin Trudeau, has said that a ban on gay ‘conversion’ therapy in the country would be a “top priority” for his new government.

The announcement came in a letter that Trudeau sent to his Justice Secretary, David Lametti, last December. The letter calls for the Criminal Code to be amended to ban ‘conversion therapy’ across all of Canada.

Related: Virginia becomes first southern state to ban gay ‘conversion therapy’