Producer Jeff Bhasker faced a daunting task several months ago. After having worked with Kanye West and winning Grammy Awards for producing Mark Ronson’s “Uptown Funk,” and Fun.’s 2012 album “Some Nights,” he had to decide whether to take on a new project: the debut solo album of One Direction member Harry Styles.

“I’d just had a baby, and I was kind of like, ‘Eh, I don’t know if I’ll jump into this,'” Bhasker tells Variety. He agreed to have Styles come over to “just talk,” and proceeded to put him through the Bhasker home sniff test. “My dog tends to bite people, and he was kind of scoping Harry out,” Bhasker explains. Styles “did this move — like a little shoot the gun with his finger, and my dog walked over and started licking his finger. That’s when I was, like, ‘This guy has something special.'”

Once music came into the mix, Bhasker was sold. “He started playing references of what he wanted to do, which sounded like a cool rock band. I got it, and could see where if we pulled this off, it would be one of the coolest things ever. But he needed a buddy who plays guitar like he’s Keith Richards.” The insinuation being: Styles is the Mick Jagger in this scenario.

Adds Bhasker: “I’m so proud of the album itself, and also of Harry for being so brave, and committing 100%, and writing the kind of vulnerable lyrics that he wrote, and not pandering to what people thought he would do. People have no idea that this is what Harry Styles is like. Just like I didn’t know. He’s obviously very famous and beloved, but people don’t know the depths of what an amazing personality and artist he is.”

Variety spoke with Bhasker about the recording of “Harry Styles” ahead of the album’s May 12 release:

You went old school for the recording of the album, sequestering Harry and the band in Jamaica for a stretch. What was Harry’s main role in the sessions?
Harry got to lead the room. It’s very much Harry’s album and the music he wanted to make. And he was very specific what kind of ideas turn him on. He’s pretty clear, in the coolest way, about what he likes and doesn’t like, so it really got the album off on the right foot and finished on the right foot. In the first week, they did, like, 10 songs, half of which ended up on the album.

How was the writing process?
Everyone was involved in the writing. It was a really small team — Me, Tyler Johnson, Mitch Rowland, Alex Salibian, and Ryan Nasci, the engineer — and we stuck with that team all the way through the album.

Was there a lyric you were particularly impressed with? 
I was pleasantly surprised at how witty, clever, and well-read Harry was. He actually turned me on to some poetry and literature that I hadn’t been aware of. We dove into [Charles] Bukowski, which is some pretty gritty dark s—, so we’d say, “Let’s make sure we go that direction and stay the course; let’s not bail out and go with something safe.” I think I did push him in a lot of ways, but then I wanted him to have complete ownership of it and to sing what is really in his heart.

There have been lots of comparisons of Harry to Jagger…
I think the charisma and the energy he has is on level with that, but he’s 100% Harry. It’s easy to make a comparison early on, but as people absorb what this is and who he is, they’ll see that he’s his own thing. Obviously we’re trying to push the envelope of being a boy band, so early on, I was, like, “It has to be super edgy,” but then it was about knowing when to pull back up against the edge and be real. Which is ultimately what I think we landed on.

How is Harry as an instrumentalist?
I’ll tell you this much, the first time I saw him pull out the guitar, I was, like, ‘Oh damn, he can play!’ He has a nice stroke. He has a feel and a sound and an emotion. He’s a real musician.

Clearly there are nods to Bowie and Queen on the album. Have you found his musical taste to be distinctly British?
You know, we did not once go listen to Bowie or the Rolling Stones or Queen. We didn’t even mention them one time. But one thing that did come up was a song that felt a little like Led Zeppelin, and he was, like, “I never really checked them out.” So we watched [Zeppelin documentary] “The Song Remains the Same,” and he was, like, “Yeah, they’re kind of weird.” I was actually happy that we were not creating some pastiche of all these influences that he knew backwards and forwards, it was more of his gut.

Releasing “Sign of the Times,” a six-minute-long song as a single, was surprising as it breaks from pop radio norms. Who played a part in that decision? 
That was kind of out there. And by the way, the song was made in four hours, from writing it to tracking it. That’s part of the reason why it’s so long because Harry just freestyled it towards the end. We tracked it like that and it was kind of awesome. Once we had it, we knew it was a winner. It starts out with Harry’s voice sounding so great and then you hit them with [the next verse] and you’ve got ’em. It is a hit in that sense, but it was so long that we weren’t sure if it could be the single. Thank God, [Sony Music CEO] Rob Stringer said, “I think you go with ‘Sign of the Times.'” Then, we tried to do major surgery on it to try and make a radio edit and presented it to him and, he was, like, ‘That’s cool, but I think we should push the full-length.’ We were looking at each other, like, what planet are we on that the head of the label says, ‘Yeah, let’s release a six-minute single.'”

Do you have another track you’re especially proud of?
“Meet Me in the Hallway” draws from this rich tradition of the past and of rock music but it’s totally new sounding. Nothing out right now sounds like this song, I always love when I’m a part of something like that. It’s minimal and it’s magical. It takes you to another world. When they played it for me, I was reminded of when I was a kid and first dropped the needle on a Pink Floyd album I had never heard before. I’m not a big [pop] music listener. I listen to KLOS and KCRW and maybe the hip hop station. I’m kind of a classic rock dude. And Harry made a classic rock album. But that’s hands down my favorite on the album.

One producer, one band, all cut in one studio. How did you know that going to Jamaica was the right situation for Harry?
I didn’t, necessarily. He’s the one that wanted to do that. Of course, having had the experience of working with Kanye in Hawaii and experiencing the isolation, I thought it would be a good thing for us. It’s never bad thing to focus, isolate, and go a little island crazy. It wasn’t a hard call.

What was the daily routine like?
It was a 24/7 music fest: wake up, do some exercise, go to the studio all day, come home, eat dinner, write songs back at the house, go try out some ideas, maybe get excited and go back to the studio at 2 a.m. It was just a nonstop flow of creative ideas, which was great.

Of the artists you’ve previously produced — be it Kanye West or the Rolling Stones — who does Harry remind you of?
It’s so f—ed up, because I want to squash all these comparisons between Mick Jagger and Harry, but he really does have that energy where he’s, like, the coolest guy in the room. After working with Mick, there’s a similarity there. There’s only one Mick Jagger and there’s only one Harry Styles, but they both have that kind of charisma. It’s like what life should be — be cool, man. Love one another.”

This album is certain to appeal to the over 35 crowd. You’re a first time father, was there an intent to try and bridge the musical gap between parent and kid by going with this sound?
I mean, a little bit. Of course it’s in the back of your head. Maybe daughters will be, like, “Damn dad, your music is actually kind of dope,” and fathers will be, like, “Man, that Harry Styles album is pretty great, I like that.” Maybe we’ll bring fathers and daughters together.