It's no secret that Ed Sheeran had a hand in writing Justin Bieber's megahit "Love Yourself," but the British singer-songwriter recently revealed that the Biebs actually wasn't the original artist in mind when he penned it. Without Bieber, though, the chart-topping tune would still be nonexistent -- or may have never even come to fruition.

“That was a song I had written for Divide. It just wouldn’t have made it," Sheeran explained in an interview with Carson Daly on 97.1 AMP Radio Monday morning (Jan. 9). "And then Justin took it and did his thing on it, and released it as a single and made it what it is. So going from a song that would have never been released to [being] the biggest song of last year -- it just became Billboard's #1 of 2016 of the whole year, and [was] nominated for Song of the Year at the GRAMMYs -- it just shows you that you shouldn’t always write stuff off.”

Sheeran didn't elaborate on what kind of touch Bieber had on the song, but he made sure to give the Purpose singer some credit. "[Justin] did have input on it, I wouldn’t say it was just all me."

Those who pay close attention to Bieber's Twitter may have noticed that Sheeran also had a role in another one of the Bieb's 2016 hits: the Major Lazer/MØ collaboration "Cold Water." But before Sheeran actually heard the track, he didn't realize he had written yet another smash for Bieber.

“‘Cold Water’ was a weird one because I didn’t even know that song existed,” he explained. “It was a song I must’ve half-written somewhere at a time where I was writing a lot of songs and I did it at Benny Blanco’s house and then I got an email from Diplo just being like, ‘Yo! That ‘Cold Water’ song is dope! Can I have it?’ And I was like, ‘I have no idea what you’re talking about,’ so I just didn’t reply. And then he emailed and was like, “Yo, Justin [Bieber] wants to hop on the ‘Cold Water’ song. Is that cool?’ And I’m just like, ‘What are you talking about?’... And then the song came out and it was number one and I was like ‘Oh, that song!’ I remember doing it, but it was really, really slow. I remember hearing it and being like ‘That kind of sounds like me. Oh wait, it was me.'"

While fans may never get to hear Sheeran's versions of "Cold Water" or "Love Yourself" -- though he did give one live performance of the latter in December -- they did get a sneak peak last week of what's to come with Divide. Sheeran released "Castle on the Hill," an homage to his hometown of Suffolk, England, and the sexually charged "Shape of You," which both shot to the top of iTunes on Friday (Jan. 6), and set a Spotify record in their first 24 hours of release.

Sheeran revealed on Jan. 12 that Divide will be dropping March 3, and has previously said that he will be sharing a few more new tunes from the LP prior to its release. Listen to his full AMP Radio interview below.