Shawn Mendes' Senorita duet with Camila Cabello almost didn't happen after she initially turned down the chance to join her future boyfriend in the studio.

The Havana star was on tour with Taylor Swift when Mendes asked her if she'd be interested in hooking up for the song, but she wasn't feeling it at first.

However, she couldn't get the chorus of Shawn's track out of her head and eventually reached out to him.

"Shawn texted me the idea for the chorus for Senorita," she tells Elle. "He was like, 'Hey, what if we work on this and do it together?' I was on the Taylor Swift tour and hadn’t been in the studio for a while. I didn’t want to do it.

"Then a few months later, I couldn’t get the song out of my head. I told him (Mendes), 'I think we should do this'. He was like, 'I don’t want to do it anymore'.

"It went back and forth for, like, eight months. Then we finally went into the studio and reworked it, so we both felt good about it, without any pressure. I love working with him so much."

The track became a monster summer hit, earning Mendes his first number one in the U.S. and topping charts around the world.