A day after gossip sites reported their breakup, Harris tweeted Thursday: “The only truth here is that a relationship came to an end & what remains is a huge amount of love and respect.”
In the social media version of confirmation, Swift — who with nearly 78 million followers is the third most followed person on Twitter — retweeted Harris.
Swift, 26, a country prodigy who has transformed herself into one of the most successful pop singers in recent years, was first seen on dates with the 32-year-old Harris in early 2015.
Swift was spotted in the crowd dancing approvingly as Harris, a Scottish DJ behind a string of hit singles, played a headlining set in April at the Coachella festival in California.
Both stars have repeatedly seen their personal lives make headlines. Swift has been linked to pop stars including Joe Jonas and John Mayer as well as the actor Jake Gyllenhaal.
Harris previously dated the Kosovo-born British singer Rita Ora.
Swift has voiced exasperation at the interest in her love life. She joked about the attention in the song “Shake It Off,” the first single off her blockbuster last album “1989.”