Justin Bieber says he was celibate for a year before getting back together and eventually marrying Hailey Baldwin — and it sounds like he did it for God.

The Biebers are featured in a new interview with Vogue, where JB revealed that he’d decided to keep it in his pants for a full 365 days prior to reconnecting with his ex last year as a way of “feeling closer to God.” He says he thought it would be a good way of bettering the condition of his soul … and thinks God rewarded him with Hailey as a result.

Even when they got back together, Justin says they refrained from sex until officially tying the knot in September during their NYC courthouse visit.

Bieber also says he had a “legitimate problem with sex” … citing it as his remaining vice that didn’t provide pleasure anymore. Speaking of vices, Justin also says he abused Xanax in his youth, adding … “Drugs put a screen between me and what I was doing” — namely, his promiscuity. He also says his security would sometimes check his pulse at night to see if he was still breathing.

Now, they’re adjusting to both the good and bad of what their new life together has brought. For Baldwin, it was initially a bout of homesickness and loneliness paired with overwhelming digital backlash over their decision. But, as fans misunderstood, it wasn’t a choice she made lightly.

More at Vogue