Ariana Grande is finally revealing the inspiration behind "thank u, next."

According to a recent tweet from the pop star, the song came about after a particularly difficult day in New York City following her split from Pete Davidson. Grande, 25, said she was spending time with friends, enjoying a little champagne-fueled retail therapy, when a friend suggested she turn her feelings into music.

"Well............ 'twas a pretty rough day in nyc," she tweeted in response to a fan inquiring about the beloved bop's backstory. "My friends took my to tiffany's. we had too much champagne. i bought us all rings. it was very insane and funny. & on the way back to the stu njomza was like 'b----, this gotta be a song lol'. so we wrote it that afternoon."

The accompanying music video came not long after the single was released. It was inspired by Mean Girls, Legally Blonde, Bring It On and 13 Going on 30, all films Grande's a fan of. The 'thank u, next' video release is the biggest in YouTube's Premiere feature's history.

It also smashed a pre-existing Vevo record, getting more than 50 million views in 24 hours. The record was previously set by BTS with their song "Idol."

"P.S. we set a new @vevo record. that's wild. i love u. thank u," Grande tweeted.

Ariana Grande, Rihanna, Lady Gaga + More Celebs in 2008 vs. 2018