Taylor Swift and Calvin Harris leave the Spotted Pig restaurant on May 28, 2015 in New York City.

UPDATE: Shortly after the co-writing news broke, Calvin Harris went off on a mini Twitter rant about the "hurtful" way this revelation was made.

Calvin Harris and Taylor Swift may be over, but TSwift's influence on his life continues in an unexpected fashion. While the jet-setting couple called it quits after almost a year, a rep for Swift confirmed to Billboard that she was the co-writer of Harris' global smash with Rihanna, "This Is What You Came For," which she penned under the pseudonym "Nils Sjöberg."

TMZ reported that Swift wrote the song at a piano and made a demo on her iPhone, which she then sent to Harris, who reportedly "loved it." An unnamed source close to Swift reportedly told the gossip site that the pair then went into a studio and did a full demo with Swift singing and Harris creating the beats.

According to TMZ, they felt it would be a smash but were afraid that having both their names on it would distract from the music, so Swift agreed to use the pseudonym, retaining the publishing rights to the track that has risen to No. 4 on the Billboard Hot 100.

On Wednesday (July 13), Harris confirmed the news, tweeting that although he wrote the music, produced the track and arranged it, Swift "initially" wanted to keep it a secret, "hence the pseudonym." He also confirmed that Swift sings on "a little bit" of the finished product.

I wrote the music, produced the song, arranged it and cut the vocals though. And initially she wanted it kept secret, hence the pseudonym — Calvin Harris (@CalvinHarris) July 13, 2016

And she sings on a little bit of it too --

Amazing lyric writer and she smashed it as usual https://t.co/vW3yGOIJit — Calvin Harris (@CalvinHarris) July 13, 2016

Nils' First World Problems blogger Nils Sjöberg, who happens to share the name, posted a comic about the coincidence, writing, "@taylorswift uses my name (Nils Sjöberg) as an alias when she produce pop songs (it’s true, google it!), one of my very own first world problems."

Swifties have been speculating about the song for weeks, with Seventeen magazine noting that at first fans were convinced Taylor provided the "oooh ooh ooh" backing vocals on it, then going into full "Taylor wrote it" mode.

I think I heard Taylor Swift at some 'youuuu youuuuu' of This Is What You Came For -- — nœh areta (@johnxnoeh) June 23, 2016

The other evidence Seventeen noted was that at one point Wikipedia listed Swift as the co-writer, then switched it to the pseudonym.