Justin Bieber revealed he had a “legitimate problem with sex” and explained why he and Hailey Baldwin saved themselves for marriage after rekindling their romance in June.

Bieber, 24, said in a Vogue interview published Thursday that he had been celibate for more than a year when he ran into Baldwin at a conference in Miami. The “Sorry” singer opened up about his sex addiction, saying abstaining from sex helped him feel closer to God.

“He [God] doesn’t ask us not to have sex for him because he wants rules and stuff,” Bieber told Vogue. “He’s like, 'I’m trying to protect you from hurt and pain.' I think sex can cause a lot of pain. Sometimes people have sex because they don’t feel good enough. Because they lack self-worth. Women do that, and guys do that."

“I wanted to rededicate myself to God in that way because I really felt it was better for the condition of my soul. And I believe that God blessed me with Hailey as a result. There are perks. You get rewarded for good behavior,” Bieber added.

The singer said running into his now-wife in June made him realized how much he loved Baldwin despite their previous rough breakup.

“When I saw her last June, I just forgot how much I loved her and how much I missed her and how much of a positive impact she made on my life,” Bieber recalled. “I was like, 'Holy cow, this is what I’ve been looking for.'”

JUSTIN BIEBER EXPLAINS WHY HE WAS CRYING WITH HAILEY BALDWIN

Bieber and Baldwin, who said they saved themselves for their wedding day, tied the knot in a New York City courthouse in September after 12 weeks of dating. Bieber admitted that sex was one reason for the quick marriage, but the couple is still planning their wedding party.

Baldwin, 22, said the “common denominator” between her and Bieber was “always church.” She admitted she was lonely the first few weeks after becoming the singer’s wife because of the nasty comments about her relationship being posted on social media.

HAILEY BALDWIN SLAMS CRITICS CONSTANTLY ‘TEARING APART’ HER RELATIONSHIP WITH JUSTIN BIEBER, LIFE EVENTS

“I prayed to feel peace about the decision [to get married], and that’s where I landed,” she said. “I love him very much. I have loved him for a long time.”

Baldwin said she’s committed to her marriage with Bieber.

CLICK HERE TO GET THE FOX NEWS APP

“We’re really young, and that’s a scary aspect. We’re going to change a lot. But we’re committed to growing together and supporting each other in those changes,” the model said. “That’s how I look at it. At the end of the day, too, he’s my best friend. I never get sick of him.”