Ariana Grande wrote three versions of "Thank U, Next," including one where she married Pete Davidson.

The pop star was recently interviewed on The Zach Sang Show, revealing that she nearly didn't release the version of the song the public has come to know and love. Grande, 25, wrote the song while her romance with the Saturday Night Live star was "on and off," and she wasn't sure how things would pan out for the pair. She wrote different versions of the song that would fit whatever real ending her whirlwind romance had.

"In my relationship by the time things were, like, up and down and on and off and so I didn't know what was gonna happen," she explained. "And then we got back together and so I had to make a different version."

Grande continued, "There's a version where I was getting married. There's a version where I'm not getting married. There's a version with nothing, we're not talking about anything. But we all knew the first version was gonna be the version we ultimately went with...I just wanted to cover all the bases."

As for the decision to name her exes, Grande wasn't sure what to do from the start. Ultimately she decided to do it, but it wasn't an easy decision to reach.

"I'm, like, super shy when it comes to, like, pitching wild things," she shared. "And so I was like, 'Is it, like, insane if I name people and thank them directly in the song?' And Taylor was like, 'Well, b----. It's gonna be a thing if you do, but I think it's brilliant...I think it's special and yes. Do it. Right now. Like, let's do it,'" she said.

After she did it, she agreed. Grande knew naming her former beaus was the right decision, regardless of the fact that it dominated headlines for months.

"Then we did it and I was like, 'Wow. This is really, really, really special and it feels really like something, you know?'" She revealed. "...Putting it in a song makes it very, 'OK. Cool. We definitely just closed that chapter.' You know what I mean?"

Grande continued, "Then I went home and slept on it and we came back and I was like, 'OK, let's make another version just in case without the names."

The backup track featured Grande saying things like, "They say I'm too young" or "I got too many boyfriends," rather than naming her ex boyfriends specifically. She focused in stead on the things the public was saying about her.

"I was just talking about what people say about me. Still. So it still was like, OK I'm embracing my mistakes and what I've done and everything that's contributed to who I am, but it was just less direct," she said. "And everyone – including me – was like, 'This is not the version.' Me as I was doing it was like, 'This is not the version.' I was also trying to be protective, you know?"

Grande continued, "It was a big risk and a very scary thing to do because it is my life. I understand to a lot of people I'm not a real person. It's easy to kind of see me as a song or a picture of a thing that kind of exists in their head and they know what they know and that's it. But at the end of the day, these are people and's real s--- to me. It is real life. And I spent a lot of time with each of those people, like, learning and s---. It was, like, scary to put in a song."

The song was "closure" for Grande and for her mom, Joan Grande. She said her mother loved the song and the fact that everyone knows how she "has felt about every relationship I've ever been in."

"That song is for my mom's closure and also as a thank you to her for helping me through a lot of s---...It was just a beautiful moment for her," Grande shared.

She didn't touch on how her exes felt about the song, but previously revealed that she spoke with them before mentioning their names on the track. Davidson has joked about his inclusion in the song several times.

Ariana Grande and Pete Davidson in New York City

More From 97.5 NOW FM