Veteran rock singer-songwriter Alice Cooper was born into the church but nearly died living outside of it.

The moment of truth for Cooper came forty years ago, after the rock star drank so much he began throwing up blood.

“Everything that could go wrong was shutting down inside of me,” Cooper, told the New York Daily News’ Confidential.

“I was drinking with Jim Morrison and Jimi Hendrix and trying to keep up with Keith Moon and they all died at 27,” Cooper explained.

That awakening made Cooper realize that he needed to change his ways. Specifically, it led him back to the church.

“My wife and I are both Christian,” Cooper, who is portraying King Herod in Jesus Christ Superstar, told Confidential. “My father was a pastor, my grandfather was an evangelist. I grew up in the church, went as far away as I could from it — almost died — and then came back to the church.”

Alice Cooper performs in concert during his “Spend the Night with Alice Cooper Tour” at The BB&T Pavilion on Thursday, Aug. 24, 2017, in Camden, N.J. (Owen Sweeney/Invision/AP)

Alice Cooper performs in concert during his “A Paranormal Evening with Alice Cooper Tour” at the Modell Performing Arts Center at The Lyric on Sunday, March 4, 2018, in Baltimore. (Owen Sweeney/Invision/AP)

Having lived as both a rock star and a Christian, Cooper has an appreciation for why some people might see a contradiction in claiming to be both.

“There’s nothing in Christianity that says I can’t be a rock star,” he explained. “People have a very warped view of Christianity. They think it’s all very precise and we never do wrong and we’re praying all day and we’re right wing. It has nothing to do with that. It has to do with a one-on-one relationship with Jesus Christ.”

Cooper, who played the role of King Herod once before in 1996, says that he drew his inspiration for the part from Alan Rickman’s portrayal of Professor Snape in Harry Potter.

“When I first heard about it, I thought Alan Rickman — that condescending sort of arrogant character —  and I kind of fashioned what I would do after what I thought Alan Rickman would do if he were alive,” Cooper said.

Copper and his wife Sheryl Goddard have been married for 41 years, a union in which neither has ever cheated on the other. Cooper shared his secret for marital bliss with Fox News in 2017.

Cooper said, “First of all, marry the girl you are in love with. That’s the important thing. Don’t just marry the girl that you love.”

Follow Dylan Gwinn on Twitter @themigtygwinn