Taylor Swift reveals inspiration behind her song 'All You Had To Do Was Stay'

Taylor Swift's has revealed the inspiration about her song 'All You Had To Do Was Stay' came from a dream about her ex.

The country crooner admitted the song came to her while she dreamed that a former boyfriend had showed up unexpectedly.

READ: Justin Bieber And Selena Gomez Release A Duet

READ: Calvin Harris Addresses Taylor Swift Split Rumours

In an interview with Ryan Adams for GQ magazine she explained, "I had a dream that my ex showed up at my door, knocked on my door, and I opened it up, and I was about ready to launch into the perfect thing to say. And instead, all that would come out of my mouth was that high-pitched chorus of people singing, 'Stay'."

Taylor Swift & Ryan Adams
Taylor Swift & Ryan Adams

Taylor Swift & Ryan Adams. Photo: GQ

But the 'the 25-year-old singer - who's reportedly still dating Calvin Harris - says the dream initially left her feeling "mortified".

"You go to say something else, and it's just like 'Stay, stay, stay. And I woke up and I was like, 'Oh, that was mortifying, but that's kind of a cool vocal part,'" she admitted.

WATCH: Taylor Swift Dance Off With Her Biggest Fan

READ: Does Calvin Harris Hate Taylor Swift's Squad?

But Taylor - who counts John Mayer, Joe Jonas, Harry Styles and Jake Gyllenhaal among her celebrity exes - refused to name the man she was referring to in the song.

Country singer Ryan, 40, was so taken by Tay's fifth studio 1989 album that he released his own version of the record last month.

GALLERY: Taylor And Selena Gomez Give Us Serious Friendship Envy!