As one of Hollywood’s most prominent action heroes, Gerard Butler makes his living by beating the bad guys. In 300, it was hordes of faceless Asian invaders. In Olympus Has Fallen, it was dozens of North Korean zealots who felt his wrath. And in Geostorm, it was, well, a geostorm.

But in Butler’s latest popcorn spectacle, director Christian Gudegast’s bruising heist thriller Den of Thieves, the line between good and evil is murky at best. Butler plays “Big Nick” Flanagan, the hardscrabble leader of an elite squad of crime fighters from the Los Angeles County Sheriff’s Department, whose extreme methods would make even the CIA’s most seasoned interrogators a little squeamish.

Here, they face off against a tight-knit crew of bank robbers—led by Pablo Schreiber and Curtis “50 Cent” Jackson—whose next target is L.A.’s impenetrable federal reserve. But as Butler explains to me over the phone, the line that separates these men is thinner than an unmarked bill. “At the end of the day, we’re dealing with humans,” Butler says. “There’s not that much of a difference between good guys and bad guys.”

To prepare for the role, Butler spent time navigating L.A.’s seedy underbelly with men like Big Nick and came to understand that while sometimes extreme, their by-any-means-necessary approach to catching criminals is part of the job and can often mean the difference between life and death.

This is one of your most physically imposing characters. He’s just a hulk of a man, the kind of guy you don’t want to challenge to a bar fight. How do you get in that headspace?
There’s an element of me in Big Nick, but not to the same extent. This is the ultimate apex predator. He’s completely fearless—he’s at the top of the food chain. He always has to exude an energy that physically and psychologically devours every space that he’s in and everybody he’s with. I wouldn’t go that far with me. I had to put a lot of work and time into how to exude that kind of masculinity and strength—that knowledge of your inherent power in every moment, and your potential for violence as well as your ability to bully.

This is another in a long line of movies about morally ambiguous cops. What do you think makes these guys so compelling to watch?
It’s always interesting to watch a character who has something more going on than simply being procedural and following the letter of the law, especially when part of his decision-making process comes from an apparatus that’s kind of breaking down. He’s coming to an understanding that he doesn’t have as much control over his life as he thinks he does. The job in front of him is the one thing he knows how to do. So we get to see this unpredictability and this danger, and that to me is such a great thing to watch, and something that we can all identify with.

Are you worried that films like this can contribute to the prominent anti-police sentiment that’s swept the country in recent years?
I hope not. I spent a lot of time with the LAPD, and in terms of the kind of cop that I’m playing, these guys are major crimes and special investigations. By the time they start dealing with the bad guys, they know who they are, and the bad guys know who they are. This is not a case of stopping strangers on the street that lead to typical claims of police brutality. This is a case of understanding who these guys are and what they’re doing, and you kind of have to be as bad as them to win. Otherwise, you’re just going to keep losing.

So you met guys like Big Nick?
I did. I trained quite a bit with guys like him. Some were full-on undercover cops, and some were LAPD special investigations. I sat with a lot of cops from the sheriff’s department and climbed into their world. I saw the challenges they go through and the impact that this kind of life has on them, the constant pressure and danger that they’re under from moment to moment. One wrong word or one wrong move will put an end to their life, and they live with that threat on a daily basis. I talked to them and their families, and I saw the incredible bond that forms between them. They rely on each other and come to know each other better than they know their own families.

How do they reassimilate into the mundanity of everyday life?
It’s almost more seductive to be one of the criminals. Their code seems tighter, and they live their life in a more simple and humble way. I know the guy I’m trying to take down in the movie. We went to the same schools. We knew each other growing up. What is it that made one go one way and one go the other way? The line is so thin, and even the way they live now, they’re still all incredibly professional, smart and courageous and obsessed with winning.

It makes you wonder about what would happen if criminals chose a different path.
Absolutely. Some of the undercover cops I spent time with told me that some of the guys they deal with are so smart that if they ever decided to go legit and run a business, there is no way they would not have been billionaires. Our jaws would drop.

Your character is someone who has let his professional life get in the way of his personal life. Is that something you can relate to?
I don’t know if I do find that balance. I answer that question often, and as I’m answering, I think, “Was I really honest?” That’s what I’d like to try and do, but I can’t say that’s what I often do. This movie is the perfect example. I put on 25 pounds of muscle to get big, and I said I wasn’t going to do it. But all the cops I talked to leading up to the film were absolutely huge.

I ended up doing [it], and by the end, I was so beaten up, and had hurt my knees from a previous movie, I couldn’t do anything. And I’d been working so much, it just became hard to adapt to real life. I completely identified with Nick’s struggle, and the damage that anything that consumes so much of your time and resources and how much that can take away from your personal life, and why it does. It’s addictive and enjoyable, and going back to normal life can be a struggle.