Calvin Harris has hit back at ex-girlfriend Taylor Swift in an angry Twitter tirade after she revealed that she penned his hit song This Is What You Came For. The 26-year-old singer's representative confirmed that Taylor had written the song under the pseudonym Nils Sjoberg.

Taking to Twitter to clarify Taylor's involvement on the song, the 32-year-old DJ began by praising his ex for her 'amazing' song writing skills. He revealed that it was her idea to use a pseudonym for the songwriter's credit, fearing that news of their collaboration might overshadow the track itself adding that she "sings on a little bit of it too."

Explaining that he had written the music and produced the song, his tone quickly changed as he accused Taylor of trying to tear him down by taking public credit for the hit song which was recorded with Rihanna at her suggestion.

Accusing the singer of trying to make him "look bad" he said her actions were "hurtful" but added that he refused to let her 'bury' him like Katy Perry.

He tweeted on Wednesday: "I wrote the music, produced the song, arranged it and cut the vocals though. And initially she wanted it kept secret, hence the pseudonym. Hurtful to me at this point that her and her team would go so far out of their way to try and make ME look bad at this stage though."

Calvin Harris
Calvin Harris has lashed out at ex-girlfriend Taylor Swift after she revealed she penned his hit song This Is What You Came For REUTERS/L.E. Baskow

He commented on her relationship with Tom Hiddleston adding: "I figure if you're happy in your new relationship you should focus on that instead of trying to tear your ex bf down for something to do.

"I know you're off tour and you need someone new to try and bury like Katy ETC but I'm not that guy, sorry. I won't allow it. Please focus on the positive aspects of YOUR life because you've earned a great one.

Having firmly set the record straight he concluded saying: "God bless everyone have a beautiful day. before posting a link to the song.

Katy Perry waded into the debate posting a cryptic GIF of Hillary Clinton shrugging. The Roar singer who is reportedly the subject of Taylor's Bad Blood, also re-tweeted a post she had shared in May of last year, which read: 'Time, the ultimate truth teller.' The two former friends fell out after Swift accused Perry of sabotaging her tour by poaching her dancers. Katy also had a relationship with Taylor's ex John Mayer who Taylor penned the break-up ballad Dear John about.

The Shake It Off singer, who has a long list of failed high-profile romances, ended her relationship with Calvin early last month after 15 months together. Their split was described as amicable at the time, with Calvin refuting cheating allegations, tweeting: "The only truth here is that a relationship came to an end & what remains is a huge amount of love and respect." A source added: "There was no drama. Things just don't work out sometimes."

It has now been claimed that the couple split over the song after Taylor felt 'disrespected by Calvin after he said in an interview that he wouldn't ever work with his girlfriend. Calvin told Ryan Seacrest in an interview that he had no plans to work with his girlfriend. He said: "You know we haven't even spoken about it. I can't see it happening though." His comment was described as "the breaking point in the relationship."

Just two weeks after they announced their split, Taylor went public with her blossoming romance with British actor Tom Hiddleston. The pair were photographed kissing on the beach near the singer's Rhode Island home. Eyewitnesses described them as being "like any young couple madly in love without a care in the world."

Even Calvin appeared to be taken aback by how quickly his girlfriend had moved on. The Blank Space singer has been flaunting her relationship with Hiddleston as the new couple have been on a love tour through Italy, the UK and Australia, and have already met each other's parents.

News about the song written by Taylor has been apparently been revealed as retribution after friends of the singer felt that the Scottish DJ was being unfair in negatively commenting on her latest relationship.

TMZ explained: '[Her friends are] sick of Calvin trashing Taylor and feel he should be thanking her for quietly giving him a smash hit.'

The stunt comes amid reports that Tom Hiddleston is set to propose to Taylor as the Love Story singer's friends reveal they have already spoken about marriage and children describing their romance as "the real deal." As for Calvin, he might just find himself the subject of another hit song penned by Taylor.