Stargate (Tor Erik Hermansen and Mikkel Storleer Eriksen) wrote this with R&B songwriter Crystal Nicole and Sandy Vee, who co-produced Katy Perry's Firework
." Rihanna loved the song immediately and so did Perry, who announced she wanted to sing it. "We knew just from those two reactions that we had something special, but obviously it was a Rihanna song first, so she got it," Hermansen told Entertainment Weekly
. "It was the easiest process ever with that song because it was brief. Rihanna recorded the song and put it out super fast. I think the secret to that one is the statement it makes in the chorus. This is as close to a diva moment as you’ll get. It's modern in its sound, but it has that classic diva moment, where she's really belting and singing it out. You don't get a lot of those records."
Eriksen added: "She killed it. And not to be too technical, but what makes the song a little bit different is the key change: The verse is in one key, and then it goes into a different key in the chorus. That's not a usual thing to do in dance music or pop music in general."