Calvin Harris has hit out at his ex-girlfriend Taylor Swift after it was confirmed that she did write his latest hit.

The Scottish DJ posted a string of messages on Twitter, saying Taylor’s behaviour was “hurtful” and alluding to her new romance with Tom Hiddleston after Taylor’s camp said she penned Calvin and Rihanna’s track This Is What You Came For.

Calvin Harris (Ian West/PA)Calvin Harris (Ian West/PA)

Her spokesperson said: “Taylor Swift wrote This Is What You Came For under the pseudonym Nils Sjoberg.”

Calvin – who split from Taylor in May – shared a link to a US article about Taylor writing the song and tweeted: “And she sings on a little bit of it too. Amazing lyric writer and she smashed it as usual.”

A string of other tweets followed:

Calvin, 32, ended his messages writing:

Taylor, 26, and Calvin dated for 15 months before parting company in late May.

The Shake It Off singer started dating Tom weeks after the break up.