Singer Miley Cyrus has said that she left her church when she was younger because of how it treated her gay friends after being questioned by a Christian who attends an anti-LGBTQ church.

In an interview on Instagram Live show Bright Minded, Cyrus was talking about Christianity with model Hailey Beiber, the daughter of actor and conservative Christian activist Stephen Baldwin and the wife of singer Justin Beiber.

Related: Miley Cyrus delivers a tearful thank you note to Hillary Clinton

“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,” Cyrus, who is 27, said about why she had left Christianity.

“I had some gay friends in school,” she said. “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.”

Cyrus came out as pansexual in 2015.

“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,” she concluded.

Beiber said that she and her husband are devout Christians and, while her relationship to religion changed as she grew up, she has found a church that “worked for” her. That church is anti-LGBTQ.

Beiber attends a Hillsong church, an Australian Pentecostal denomination with 80 churches worldwide.

The church’s website says it “does not affirm all lifestyles.”

“Put clearly, we do not affirm a gay lifestyle and because of this we do not knowingly have actively gay people in positions of leadership, either paid or unpaid.”

Former gay members have said that the church tried to push them into conversion therapy.

Hillsong has a reputation of being hip and modern, and it has attracted a lot of young celebrities because it indulges in prosperity theology, the idea that God wants his followers to lead “healthy and prosperous lives.” Telling followers that their wealth means they’re favored by God is one way to attract rich congregants.

The church got attention last year when out actress Ellen Page criticized actor Chris Pratt for attending the church, which she called “infamously anti-LGBTQ.”

So Beiber’s exchange with Cyrus was basically a straight Christian who attends an anti-LGBTQ church wondering why an out queer woman doesn’t go to church as well.