In the summer of 1995, the Backstreet Boys walked into East restaurant in Sweden and sang a cappella for Max Martin and the late Denniz Pop from local production house Cheiron Studios. The meeting would lead to the quintet working with the duo on songs like “We’ve Got It Going On,” igniting Beatles-like mania in Europe and Germany -- which soon swept across the rest of the world.

But it was their follow-up collaborations with Martin and his team on 1999's Millennium -- which would smash records, rack up RIAA certifications and earn five Grammy nominations -- that cemented the group’s place in pop music history, with songs like “I Want It That Way” remaining global pop anthems two decades later.

“Max is a musical genius,” Howie Dorough tells Billboard ahead of the record’s 20th anniversary on May 18. “His writing, his producing, his arranging of vocals -- he’s just really got his finger on the pulse and we were very lucky that we started our careers with him. He’s by far the biggest reason why the Backstreet Boys are as successful as we are, besides our amazing fans. Max brought us all those big hits and we’ll always be indebted to him for that. He was also just really smart about getting the right people to help him, and the teams he assembled for us on Millennium were amazing.”

Part of that team (who were also behind hits by Britney Spears and *NSYNC) was producer and songwriter Rami Yacoub, who became Martin’s protégé after Pop became ill, passing away from stomach cancer in 1998. Yacoub became a strong creative force on the production of Millennium, but it’s only now that he appreciates the impact that the music had.

“I think that whole era with Britney, Backstreet Boys and *NSYNC, you don’t realize how special it was until you’re OG -- the oldest guy in the room, with people going, ‘You’re a legend. You did all the songs I used to dance to as a kid,” Yacoub reflects from a West Hollywood studio, where he’s now working on new music for Lady Gaga and Liam Payne. “It’s not something we thought about at the time. We weren’t trying to change the world, we just tried to make songs the best they could be, and it just happened to be a group of people who gravitated towards each other and became really close friends. It was a house filled with knowledge, talent and everybody mentoring each other.”

“I Want It That Way” co-writer Andreas Carlsson agrees that the team had no idea how iconic the music they were creating in the bubble of Cheiron Studios would become. “We became a brotherhood, but it’s only now when we get together 20 years later, that we reflect on the amazing time that we were too immature to understand back then,” he reflects. “In hindsight, it’s clear that it was all magic.”

As the Jive Records album turns 20, here is the track-by-track story of Millennium in the words of those who helped the Backstreet Boys create the “magic.”

1. "Larger Than Life"

Barry Weiss, RECORDS CEO & former Jive Records president: This was the real tempo record of the album. It was the “Everybody (Backstreet’s Back)” of the Millennium album -- plus it was the opening track, so it was pretty big. Then it became a great part of their live show, when they flew in on the boards during the Into the Millennium tour. The song became somewhat of a seminal record because of that tour.

Joe Riccitelli, RCA Records Co-President & former SVP of Promotion: I remember being in Boston as the tour started and them opening up with “Larger Than Life.” I had worked with U2 and just wrapped their PopMart tour -- and I had never felt energy in a stadium like I had with U2 -- but standing there at the beginning of the Millennium tour with the girls, the shrieking and the high-pitched yelling, I was so overwhelmed. I was blown away. I think if we didn’t have “I Want It That,” then “Larger Than Life,” arguably could have been the first single.

2. "I Want It That Way"

Weiss: Clive Calder [Jive Records founder] was in Stockholm and said, “Max, I’m leaving for the airport now. Do you have anything else you want to play me?” Max was like, “I have an idea. It’s very rough and basic.” It was a rough sketch of “I Want It That Way,” and according to Max, Clive was instantly like, “That’s our first single for the new album.” Max didn’t even have verses yet.

Yacoub: At that time, lyrics were written in the house, and I remember with Britney’s “Oops (I Did It Again)” it took us two weeks just to finish the lyrics because it was like, “Okay, I guess it’s lyric time. Let’s dig in.” It was just necessary, but usually the lyrics came as we did the melody, and whatever sounded cool phonetically is what we kept – more than what made sense. That’s why “I Want It That Way” doesn’t quite make sense.

Weiss: We thought the original lyrics were typically “Swedlish” – half-Swedish, half-English. What we were missing was that it was the melodies and the counterpoint harmonies that really drove that song. Clive asked Mutt Lange if he would redo the lyrics, the group re-sang them and we were like, “Okay, we’re ready to go.” Then I had a meeting with the group where it was like a protest. They came into my office and Kevin Richardson, the most vocal of the group, was like, “Listen, we like the original version. There is no way we want this new version to come out,” and I was like, “Guys, you’re wrong.” They prevailed and we said, “Fuck it, let’s back them.” It came out and they were right -- it was an immediate, monster hit.

Riccitelli: In my whole my career, there are three songs that really stand out when I played them to people for the first time: “Can’t Stop the Feeling” by Justin Timberlake, “Uptown Funk” by Bruno Mars and Mark Ronson and “I Want It That Way.” You just knew by the way people responded when you played that song that it was going to be a ginormous record.

Carlsson: With all the big songs you write, it’s like, “Are you ever going to write another song that big again?” It’s probably impossible to ever do something as big “I Want That Way” again. We had an amazing band and great team of producers -- during the peak of CD, so the stars really lined up. People would be surprised knowing how much time we spent on these songs, especially Kristian Lundin, the producer. I think “I Want It That Way” took three weeks just to mix. A lot of the Millennium stuff is perfection. These songs were highly-calculated to be effective songs that would stand the test of time. It was almost like we knew they were going to be classics, so we had to do an amazing job to make them timeless. We went in deep to create a masterpiece.

3. "Show Me the Meaning of Being Lonely"

Weiss: I remember this song coming in and all of us being like, “Oh my God, this is amazing.”

Herbert Crichlow, co-writer: For me, the song was a way of saying, “I see you. You are not alone,” to all those who experience the solitude of loss, loneliness and heartache. That was the inspiration -- no man or woman is an island and we are in this together.

Yacoub: I had started working with Max closely not long after we got the horrible news that Denniz Pop was sick with cancer. Denniz passed away shortly after I started and it was brutal for all of us to lose our godfather in music and close friend. At the same time, we were finishing Millennium and it took forever to complete “Show Me the Meaning of Being Lonely.” It took them weeks and weeks – it was really rough for the guys.

Crichlow: As with most songs we created together, it was very emotional. People have no idea how much it means to me that the song has touched so many hearts over the last 20 years.

4. "It's Gotta Be You"

Yacoub: I came in at Cheiron as “the cool beat guy.” I guess I was “urban,” in the sense of being more rough around the edges. I remember Max telling me, “You gotta quantize shit!” and I was like, “No you don’t!” On Britney’s “...Baby One More Time,” I was playing a shaker that comes in every 8th or 4th bar, but I played it a few times and just took the one that felt the best. Max was stubborn saying it needed to be quantized on the beat, whereas I was like, “No, it sounds good!”

Cheiron had a huge sound bank that was used, and most of the songs were recycled beat-wise. I think that’s part of what made the “Swedish sound.” I came in and added my thing -- like the stops, scratches and gravelly sounds in this song -- and that’s what I brought to it. I wasn’t an urban guy, but it probably felt like that because they were all Swedes and I came in like a brown kid!

It’s funny how the lyrics could just be honest and straightforward. These days you can’t just say, “I love you" -- it’s got to be like, “I’m starving for your love.” If you look at the Millennium song titles, like this one, everything’s so simple.

5. "I Need You Tonight"

Andrew Fromm, songwriter: I was heartbroken over a girl coming out of high school -- she was one of my best friends, and I wanted it to be more, and she didn’t. I wrote this song relatively quickly, then my entire life changed by deciding to go out one night. If I didn’t go out after working TGI Fridays to watch my Jewish hip-hop artist friend performing at Honeysuckle in New York, then Star Search casting director Patrick Alan would never have seen me and said I should try out for the show, which I got into out of 40,000 people.

Patrick started running open mic nights, and I did those for three years, singing “Heaven In Your Eyes” -- the original title for “I Need You Tonight” -- almost every night. I met this girl named Samantha Cole, who was Universal’s next big thing, and at her birthday party, with every major executive in the room, I performed the track at a white grand piano and the senior director at Jive Records said, “I want that song for the Backstreet Boys. Nick Carter should sing it.” I was like, “I have no idea who the Backstreet Boys are,” and he said, “They sold six million albums in Europe.”

Nick killed it on the song, then they put me in the studio with Mutt Lange, where I played piano on the track. Shania [Twain, Lange’s ex-wife] was taping VH1 Divas and I was at their house waiting for Mutt to get back. He was the most humble, nicest guy. Mutt wanted to pull up some of his and Shania’s background vocals and if you hear the chorus of “I Need You Tonight,” you hear a repetitive pattern underneath. I think he took a piece from “You’ve Got a Way,” played it in reverse and made a really unique sound to lay underneath. That’s Shania’s background vocals! It was fascinating when he did it. But that’s why he is who he is -- an unbelievable record producer.

6. "Don't Want You Back"

Yacoub: We thought the opening line, “You hit me faster than a shark attack” was super-cool, even though you would never say that now! The main harp in this song felt really urban for us. “It’s Gotta Be You” has more classical snares, and this was more like a rimshot, so it felt urban.

Listening back to these songs now, they seem so overproduced. You hear explosions, stops and all kinds of things. Nowadays, songs are so sparse and simple. But a lot of time was spent on the production and everything was thought through for every song back then. We left no stone unturned. I remember we sat for two weeks trying to do a cool snare for Britney’s “Oops!... I Did It Again” that would sound similar to the snare in “...Baby One More Time.” Then I was like, “Why don’t we just take the same snare?” Sometimes you had to go through that to get to that point, because we might have found something different and cool.

7. "Don't Wanna Lose You Now"

Yacoub: I love this song. If you listen to the second verse when the beat comes in, it’s very similar to the “I Want It That Way” beat. Kristian Lundin produced “I Want It That Way,” and he was also the magic on “Quit Playing Games.” So, I was doing the drums on “Don’t Wanna Lose You Now,” trying to replicate “I Want It That Way,” and if you listen back and forth it has the same high hats, same kind of snare and a different kick. I was like, “Kristian, can we have that snare?” He was just a genius with making the sounds sound really good.

8. "The One"

Weiss: “The One” was a cool song. It was always great live. I remember the incident with Nick [encouraging fans to vote for “The One” to be released as a single over “Don’t Want You Back.”] It was a source of great internal discussion.

Riccitelli: What was great about “The One” was that they did a really great job of honoring their fans in the video. I think touching your core fans really does make a difference, and lyrically it made sense because the song was written about their fans, as well as love interests. We were coming off of the biggest first-week sales ever, so we were definitely comfortable with that being the last single.

9. "Back to Your Heart"

Gary Baker, co-writer: I worked for Zomba Music Publishing and had a big record, “I Swear” with All-4-One, so my bosses thought I would be a good fit for the Backstreet Boys. I first met them at the Fox Theater in Atlanta and when I walked in, they started singing “I Swear.” On Kevin’s first trip to write with me, he was sitting at my piano and played a beautiful intro and I said, “Wow, we can really make a great song around that.” We started talking about things he was going through and a situation with a woman he wanted to get back with and I said, “There you go -- back to your heart. That’s the perfect way to go with this song.” Of course, he married her and they’ve now got two beautiful children, so it worked out well! It brought them back together.

It’s funny how big those songs were. When I do a writer’s night, I’ll perform “Back to Your Heart” and everybody goes nuts. As soon as I mention Millennium, people know that song. It’s almost like it was single.

10. "Spanish Eyes"

Fromm: My cousin, Sandy [Linzer] is a legendary songwriter who has written for The Four Seasons and Whitney Houston, and we wrote this one together. Sandy randomly came up with the concept of a non-Spanish person falling in love with a Spanish person. Sometimes when the guys perform it, they’ll sing, “When I look into your Cuban eyes,” or add in the nationality of wherever they’re at, which is cool.

I think Sandy thought it was going to be for the Backstreet Boys -- at that time, everyone I was co-writing with was trying to write a song for them. I was more thinking Ricky Martin. But the funny thing is that Ricky released a song called “Spanish Eyes,” right at that time, and everybody got really mad at me, thinking I had given him our song after Backstreet recorded it.

I’ll never forget when [Jive Records executive] Steve Lunt called and said, “You made the cut. ‘Spanish Eyes’ is on Millennium.” I was driving golf balls and just threw my club up in the air because I was so excited!

11. "No One Else Comes Close"

Baker: That was one of those great days in Nashville where you get in a room with somebody and the song just falls out. I had a writing day with Joe Thomas and Wayne Perry, then I played it to Clive and he said, “I want Joe to do this, but I also want to put it on Millennium.” It was extremely exciting because I love Joe and his version is unbelievable, but that Millennium record -- man, that was the record to be on!

I wasn’t even trying to write a pop song -- I was just trying to write a great country song with lyrics that could transcend. But most of my songs at the time were mushy. That whole time of mine, from “I Swear” through to Backstreet Boys, I was just married and just had a baby. So it was a wonderful, emotional time and a lot of great music came out of me.

After that, Clive wanted to fly me to Munich to see the fanfare in person. He said I wouldn’t believe it and he was right. They were lining up wheelchairs at the front of the venue to wheel girls out as they passed out!

12. "The Perfect Fan"

Eric Foster White, producer and strings conductor: That song was Brian [Littrell’s] baby. He was easy to work with -- truly a pro and knew exactly what he wanted. We recorded the basic track at my studio in New York, flew to Detroit to record the orchestra, flew to Lexington to record Brian’s high school choir, back to New York to edit, did vocals in Orlando, then mixed back in New York.

The biggest challenge was to capture and assemble all the elements on such a short timetable. When you're flying to another city and have 30 musicians in a room for two hours, you really have to make sure you get it perfect, as you can’t go back and fix it. You have to think ahead and hear the final product in your head. Today, producers would do all of what we did using simulated instruments on a computer! Brian did a great job conducting the school choir -- that’s not as easy as one might think. Between the vocals, orchestra and other instruments there were probably over 100 tracks to be mixed, which really did push the limits of technology at the time.