Joshua Harris, a former pastor who wrote relationship book, says his marriage is over and he is no longer Christian

Josh Harris, author of 'I Kissed Dating Goodbye.'

(CNN)A former pastor who wrote a bestselling book on traditional relationships has confirmed the end of his marriage, apologized for opposing LGBTQ rights and announced he is no longer a Christian.

Joshua Harris' book "I Kissed Dating Goodbye," which railed against sex before marriage and homosexuality, sold over 1 million copies and became a fixture in Christian youth groups after coming out 22 years ago.
But Harris now says the 1997 work "contributed to a culture of exclusion and bigotry," and that he has "undergone a massive shift in regard to my faith in Jesus."
Writing on Instagram, he added: "By all the measurements that I have for defining a Christian, I am not a Christian."
    "I have lived in repentance for the past several years -- repenting of my self-righteousness, my fear-based approach to life, the teaching of my books, my views of women in the church, and my approach to parenting to name a few," Harris wrote in the post.
    The cover of Harris' book.
    "To the LGBTQ+ community, I want to say that I am sorry for the views that I taught in my books and as a pastor regarding sexuality. I regret standing against marriage equality, for not affirming you and your place in the church, and for any ways that my writing and speaking contributed to a culture of exclusion and bigotry. I hope you can forgive me," he went on.
    Harris previously confirmed his divorce in a separate post last week, announcing the end of his 21-year marriage after realizing that "significant changes have taken place in both of us".
    A group of Christians attended a pride parade to apologize for how they've treated the LGBT community