"It Ain't Me" is a song by Norwegian DJ Kygo and American singer Selena Gomez. It was released by Interscope Records, Sony and Ultra on 16 February 2017 as the lead single from Kygo's debut extended play Stargazing (2017) and it appears as an international bonus track on Gomez's third studio album, Rare (2020). The song was written by Kygo, Gomez, Brian Lee, Ali Tamposi, and Andrew Watt and produced by Kygo, Watt and Louis Bell. An EDM, dance-pop, electropop and tropical house song, "It Ain't Me" comprises an acoustic guitar line, and a build-drop arrangement in its chorus featuring pulsing piano notes, bass, synthesizers, finger-snap claps and pan flute melodies. Gomez sings the track in a husky tone, while in the chorus her vocals are reduced to recurring syllables. The lyrics narrate a past relationship ruined by alcoholism. In addition to reaching number one in Croatia, Lebanon, and Norway, the song attained top five peaks in Australia, Austria, Belgium, Canada, the Czech Republic, Denmark, Finland, France, Germany, Greece, Hungary, Ireland, Malaysia, the Netherlands, New Zealand, Poland, Portugal, Scotland, Slovakia, Sweden and Switzerland. It also reached the top 10 in Italy, Spain, the United Kingdom and the United States. The song was remixed as an Amapiano song in 2021 which went viral on Tiktok. Writing and recording The lyrics to "It Ain't Me" were written by Andrew Watt, Brian Lee and Ali Tamposi. With Watt previously working with Kygo, the DJ's manager Myles Shear contacted Watt for a session with Kygo which Watt also facilitated for Lee and Tamposi. During their session for "It Ain't Me", they initially found the track very poor, but were trying to salvage it. Kygo and Shear suggested that they continue working on the song. After Kygo and Shear had left, Tamposi told Watt and Lee to play guitar and "Fleetwood Mac it", spawning a 45-minute jam session as well as the demo of "It Ain't Me", a simple acoustic guitar recording with Tamposi on vocals. Watt, Lee and Tamposi then asked Kygo to return to their studio to hear "It Ain't Me" for a second time. Tamposi recalled, "When they pushed the space bar to play the song, [Kygo] went from this very sweet, polite, charming young man to this super-human producer guy. I was watching his eyes go back, left and right, just mapping out how he envisioned the production of the song.