A version of this story appeared in the April 6 issue of EW, on stands now. Don’t forget to subscribe for more exclusive interviews and photos, only in EW.

You may not know the names Tor Erik Hermansen and Mikkel Storleer Eriksen, but chances are the Norwegian duo better known as Stargate have produced some of your favorite hits. Over the past two decades, they’ve undoubtedly shaped the sound of modern pop. They’ve collaborated with A-list divas, rappers, and rock bands alike. They helped usher dance music into the American mainstream. They guided Rihanna to superstardom with nine Top 10 collaborations. And for two guys from a small city in Norway, they’ve had a profound impact on U.S. pop culture, with artists performing songs they wrote at two of the past four Super Bowl halftime shows. Last year, they kicked off their career as artists in their own right, inking a deal with RCA Records and putting out Top 40 ear candy — like the powerhouse Sia and Pink duet “Waterfall” — under their own name for the first time. And now, for EW’s new Untold Stories issue, the duo are sharing the origin stories behind 13 of their biggest tracks.

“S Club Party,” S Club 7 (1999)

Tor Erik Hermansen: That was our first hit in the U.K. We were brought on board by [manager] Simon Fuller, who had just finished working with the Spice Girls. He said, “I have this new group, and there’s seven of them,” and we thought, “Oh my God, how are we going to fit seven people into one song?” That was the biggest challenge. We wrote the verse where they introduce themselves because we felt it was important that you got a feel for all of the different members. They had flown to Trondheim in Norway and hung out with us for a week or two at least.

Mikkel Storleer Eriksen: We’d met them in London before that as well, so we had spent some time with them. It was a great experience.

Hermansen: Our passion has always been in American pop music, whether it’s hip-hop or R&B or more rhythmic pop. It’s what we love. But this came along, and we just wanted to work. We just wanted to make songs. That’s basically what got us started. It’s a very pop-y beginning, but it was great practice for later in life.

Eriksen: There’s nothing that we regret doing, by any means. It was a fun time.

“So Sick,” Ne-Yo (2004)

Eriksen: Our management had spoken about him to us previously, but the meeting was by chance. He was working in the same Sony studio as us having some meeting, and the CD player didn’t work, so he asked to use our room for his meeting. We had the opportunity to play him some of our music. He said later that he couldn’t believe these two white guys were making such sultry music.

Hermansen: When we worked with Ne-Yo, we knew it was our opportunity to see if we had what it takes. We played him this track [that eventually became “So Sick”], and he loved it, but his management wanted him to do a totally different kind of record. They insisted we stop what we were doing and try something else. Reluctantly, we went and did another song, but by the end of the night, we were like, “Let’s go back to that first idea!” When Ne-Yo finished the lyrics and sang us his vocal idea on top of the track, we knew we had something special. That night I took a cab home at 2 in the morning and woke up my wife like, “We’ve done it! We’ve written our best song yet!”

Eriksen: It became a party later. The record label came down, and they called more people like, “You gotta come down and listen to this record!”

Hermansen: We had 40 people in the room by the end of the night.

“Irreplaceable,” Beyoncé (2006)

Hermansen: The seed for that song came from [Roc Nation CEO] Jay Brown, one of our early managers. He said, “I think you guys should make a song that has acoustic guitar and hip-hop beats.” That’s all he said. We had no idea what to do with the song because it was so different, but Beyoncé heard it and said she wanted to cut it. We heard the song wasn’t going to be on her album [2006’s B’Day] because it didn’t fit [the vibe], but then four hours later the label called us back and said, “Actually, not only is it going to make the album, it’s going to be the third single!” She had us change a few things to make it more current-sounding: the arrangement, some of the drum sounds.

Eriksen: We recorded with her and hung out with her in the studio a few times. She’s the best in the game, hands down. She takes her shoes off and lays on the couch and is very hands-on when it comes to her own vocals.

Hermansen: She’s also so beautiful that you can’t really look straight at her. You have to look to the left of her or something so you don’t get distracted. She’s just magnetic and, really, the most humble. There’s never any drama. She always finishes her stuff. A lot of people like to throw ideas down and finish it later. I think because she’s so busy, she always finishes stuff on the spot — singing the last chorus, doing the last ad-lib, throwing in the extra harmonies. She never leaves anything half-finished.

“Don’t Stop the Music,” Rihanna (2007)

Hermansen: It was a seminal record in the sense that, prior to that song and Justin Timberlake’s “SexyBack,” dance music was basically non-existent in American pop. People would always say, “That four-to-the-floor kick-drum pattern doesn’t work in America, it’s not going to work on radio.” And up until that point, they would’ve been right. But for this particular song, which started with the “mama-say mama-sah” sample that Michael Jackson used on “Wanna Be Startin’ Somethin’,” it was the right thing to do. That was our first time making a dance beat, but we tried to keep the melody soulful and the bassline funky and not too cold and techno-y.

Eriksen: Before we met her, before we even saw a picture of her, we could tell Rihanna was going places just by listening to her voice on “Pon de Replay.” We just knew, like, “We have to work with this girl!” There’s something very special about her voice. I remember when we finished “Don’t Stop the Music,” we were like, “Oh my God, this must be the first single! This is the best thing ever!” And then coming out of the studio room next to us was “Umbrella” and when we heard that, we were like, “Oh God, no!”

Hermansen: She was the same person then as she is now. She’s always been real. She’s always generous. She remembers people. She hugs people. She’s just a regular girl who happens to be a superstar.

“Rude Boy,” Rihanna (2009)

Hermansen: This was probably the first session we did with Ester Dean [the Pitch Perfect actress who’s written for Nicki Minaj, Mary J. Blige, Britney Spears, and others]. Rihanna came up with the title — she said she wanted to do a song called “Rude Boy” and gave that idea to Ester. We made this beat with a guy called Rob Swire, who used to be in the electronic group Pendulum. This was right when we started experimenting with the combination of trancier EDM sounds and slower hip-hop beats. “Rude Boy” was one of the earliest examples of those sounds coming together. Rihanna left for an hour or two, came back, and then when we played it for her, she was just blown away: “Did you guys just do this?” She was the one who really fought for that record and knew what it was. I don’t think even we knew what it was.

Eriksen: We didn’t believe that it would be the biggest record from the album. We just liked it. We thought it was a hot record.

Hermansen: There are some records everyone believes in, like, “Oh, this is a big single!” But nobody talked about “Rude Boy” until the album came out. We were worried “Rude Boy” wasn’t going to make the cut [because 2009’s Rated R was so dark], but to Rihanna’s credit, she was the one who wanted to keep it.

“Firework,” Katy Perry (2010)

Hermansen: Katy basically sat down and wrote the top line to that song together with Ester Dean in a short time. At the end of the night she said, “Let’s record the song tomorrow,” and we said, “No no no, can’t we just lay down a rough scratch vocal tonight, just so we have something to listen to?” In 10 minutes she sang the song two or three times, and we pieced the vocals together. I would say 95 percent of what you hear on the finished record is from that demo. She had played us a couple of the other songs that were going on [2010’s Teenage Dream], like “California Gurls,” and they were obviously huge smashes. But we also knew that she was a better singer than a lot of people thought at the time, and we wanted to highlight that. One of the things we told her was, “We’re not going to do any harmonies, we’re not going to do any fancy vocal takes, it’s just going to be you singing it raw.” I think it’s one of her finest performances, because she wasn’t thinking, she wasn’t trying to be perfect, it was just from the heart. She really took the lead on writing that song.

Eriksen: She’s a really good writer.

Hermansen: We had no idea it was going to become [such an anthem] when she wrote it. I like that it’s about being yourself. A lot of times you just end up writing about relationships, but this had that inspirational message to it. And the video is brilliant, highlighting people of different races and different sexualities. It was a really great moment to be a part of. I actually went a few months ago to my kid’s school, they have these Friday gatherings, and they sang the song. It still means a lot to people who probably weren’t even born when the song came out.

Eriksen: That’s what makes it all worthwhile. You know you’ve succeeded when you can create something that goes on to live its own life and actually mean something to someone.

“Black and Yellow,” Wiz Khalifa (2010)

Hermansen: That’s our first serious rap record. We’ve always loved hip-hop, but because some of our early stuff was more melodic, we were never given the chance. When Wiz came to the studio, we gave him another song first — a harder, darker hip-hop record that he loved — and then we played him this track. He started saying “black and yellow” right away when he heard that synth line. We didn’t really know how significant the colors black and yellow are for someone from Pittsburgh.

That’s our first serious rap record. We’ve always loved hip-hop, but because some of our early stuff was more melodic, we were never given the chance. When Wiz came to the studio, we gave him another song first — a harder, darker hip-hop record that he loved — and then we played him this track. He started saying “black and yellow” right away when he heard that synth line. We didn’t really know how significant the colors black and yellow are for someone from Pittsburgh. Eriksen: He said he was talking about his black and yellow car, so we didn’t really get the big picture, but we liked the song.

He said he was talking about his black and yellow car, so we didn’t really get the big picture, but we liked the song. Hermansen: When it came out and became this big anthem for Pittsburgh and the Steelers going to the Super Bowl [in 2011], we were just in awe. That was the farthest thing from our minds when we were making it, but Wiz obviously knew what he was doing. One of the most rewarding moments was when we went to visit the birthplace of hip-hop in the Bronx, 1520 Sedgwick Avenue. We grew up in the ‘80s and remember when hip-hop became a worldwide phenomenon. So we went there, and we started talking to some kids that had just walked out of the building. They said, “What are you guys doing?” We said, “We make music.” They said, “Oh, do you have something out that we might know?” And we said, “Yeah, ‘Black and Yellow.’” These kids started rapping our song back to us! And it was outside of the birthplace of hip-hop, which was our inspiration for coming to America in the first place.

“Only Girl (In the World),” Rihanna (2010)

Hermansen: We had a meeting with L.A. Reid, who said, “Okay, Rated R was great, but now it’s back to the good times.” Those were his exact words. So we were like, “Okay, let’s go make some good times!” We wrote this song with Crystal Nicole and [“Firework” co-producer] Sandy Vee. Rihanna walks in and says, “I want that song.”

Eriksen: Yeah, right away. I think she even said, “Oh, that’s my first single.”

Hermansen: And then a few days later, Katy Perry was in the room and heard it and was like, “I want that song.” We knew just from those two reactions that we had something special, but obviously it was a Rihanna song first, so she got it. 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: 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.

“Diamonds,” Rihanna (2012)

Hermansen: We had been working with [“Diamonds” co-producer] Benny Blanco on a number of Rihanna songs, trying to come up with these big, uptempo, dance-pop records [for 2012’s Unapologetic]. During the last couple of days, we were like, “Let’s just do something completely different — different tempo, different everything.” That’s how the track started. Sia came through and worked on a couple different songs, and the last thing she did before walking out the door was “Diamonds.” The car was waiting outside. She had her coat on, she had her purse in her lap. We just played her the music, and the first thing out of her mouth was, “Shine bright like a diamond.” She put her vocal down in about 12 minutes while the car was waiting and then left.

Eriksen: Those are the best ones — the spontaneous ones where you don’t overthink it.

Hermansen: Rihanna heard it and loved it straight away. Rihanna really went to work on that song because she wanted to capture that character that Sia has in her voice. I think she spent two or three days recording that song, which is very rare. Normally you do it in a day or half a day. It was very important for her to capture that feeling, and she did it so well that Sia thought it was her [own voice on the song]. I think Mikkel opened up the song [file] to prove to Sia that it was Rihanna singing.

“Same Old Love,” Selena Gomez (2015)

Eriksen: The starting point was a totally different track. It was more uptempo and had indie-sounding guitar riffs on it. That really appealed to [co-writer] Charli XCX. She jumped on it and wrote the song. Then at a later stage, we totally redid the track and just left the a capella vocal. We went in a different direction with a quirky piano riff and the live drums, and that’s the version that we pitched to Selena.

Hermansen: Some of Charli’s vocals are still in there.

Eriksen: There is one little “Oh-oh-oh-oh” part that Charli has in the background. I was impressed that Selena managed to make it her own. Not a lot of people can sing a Charli song and sound good.

Hermansen: You can tell by Selena’s music that her taste is evolving, that she’s finding herself. She’s becoming better and better. With certain artists, their first album is amazing, and then they lose the plot. But with Selena, it’s been the other way around. As she’s grown out of Disney, her music has gotten better and more sophisticated. She has something that a lot of people don’t have, which is character in her voice. When she sings, you can instantly hear that it’s her. And she’s now finding that sweet spot where she’s comfortable with her own voice and not afraid to sing anymore. I think she’s been a little self-conscious [in the past], because she’s not one of these big wailers. But she does have something very special, and that’s her tone.

“Adventure of a Lifetime,” Coldplay (2015)

Hermansen: We’ve compared working with a band to flying — it’s the difference between a 747 Jumbo Jet and flying two fighter jets, which is what we were used to. When you’re working with a band of Coldplay’s magnitude, with four different individuals, it’s a totally different process. Chris Martin actually asked us very early on, “Are you guys in it for the long haul?” And it was a long haul, but it was also one of the most rewarding things we’ve been a part of.

Eriksen: It was very refreshing to do something in a different genre. The guys are so talented, and Chris’s songwriting is on another level. The way we worked was pretty interesting, too, because we’d always have two rooms running at the same time. [Lead guitarist] Jonny [Buckland] would put down a guitar idea in one studio while we worked on the beat in another, and then we would switch and go back and forth.

Hermansen: When they performed the song at the Super Bowl [in 2016], it was fun, but it was also like, Wow, this is really where dreams come true. It really did for us. To come to America as immigrants because of our love of American music, and then to not just make it, but to see our music performed on the biggest stage of American culture? It’s really rewarding on a deep, deep level.

“Worth It,” Fifth Harmony feat. Kid Ink (2015)

Hermansen: Fifth Harmony’s record company came to us and asked us to work with them. We saw something in the group that hadn’t necessarily been brought out yet, which was the fact that these girls were into hip-hop and more urban records. The songs they put out didn’t reflect their personalities, so that really sparked our vision for writing for them. This particular song started with a saxophone riff from a guy named Ori Kaplan from the group Balkan Beat Box, which plays Eastern European music in a very original way. We built a beat around this saxophone riff, and once we had that, we said, “Okay, do we have any a capellas that could fit it?” It was almost like what you would do if you were a DJ trying to make a mashup. The melody and lyrics were from an old song we had, and it just worked over the beat right away. [Co-writer] Priscilla Renea didn’t even remember the original track. We had to tell her, “Remember this song that you wrote a year or two ago?”

Eriksen: It was the same thing with the Kid Ink rap. It was something that we already had that we then put together. That’s a very different process for us. But that’s also a really cool way to do it, because if they had started with the beat [we ultimately used], then maybe they wouldn’t have written that rap verse or that chorus.

Hermansen: In terms of fitting people together and finding parts, we’re quite comfortable with giving everyone room to sing. Our only goal is for all of them to shine. We don’t have any preferences like, “This person should always sing the chorus.” We just let them sing.

Eriksen: Sometimes we record parts with multiple singers and decide later who sounds the best on each part. But as you get to know them, you also get to know their voices, and then you can more easily say, “Oh, Camila would sound great on this part.” You know exactly which girl would sound the best on each part.

Hermansen: There was another song, “Talk Dirty” by Jason Derulo, that was out before “Worth It” that also had a saxophone riff in it. [Note: In a 2015 interview, Derulo suggested he was unhappy about the similarity.] You have to remember, a song that comes out was usually created a few months earlier — or sometimes even a few years earlier. Sometimes just by chance you have similar ideas floating around.

“Waterfall,” Stargate feat. Pink and Sia (2017)