Ric Roman Waugh is no stranger to the examining the American criminal justice system.

The stunt-man-turned-director’s latest prison film, “Shot Caller,” shows how even the best of men can be corrupted by the current correctional system. Following “Felon” and “Snitch” Waugh finishes off what he has deemed his ‘Prison Trilogy’ with “Shot Caller” — a thriller that is part ’90s action movie, part character study.

Waugh spoke to Variety about inspirations for the film, his journey to get it made, and why the movie’s star, “Game of Thrones” actor Nikolaj Coster-Waldau, was right for the part.

This completes your trilogy that included “Felon” and “Snitch.” How did the films come about?

I was writing a lot of movies and was very fortunate to work for a lot of major producers. I wanted to deviate away from the big, expensive action movies and direct stuff I was passionate about. I went to a really close friend, [film producer] Tucker Tooley, and told him I wanted to make a movie that covers a controversial subject matter, but also reminds me of a question that people always ask me, especially from doing stunts: What am I afraid of? The answer is, going to prison.

What was the research process like?

I didn’t want to rely on documentaries or books. I wanted to do it from my own point of view. I found a parole supervisor in California who handled all the highest level prison gangsters in and outside of prison and I went to him and said what I wanted to do. Luckily he went on this ride for me because he knew it wasn’t a movie that was going to be against or for the system — it was going to put you on the fifty yard line.

So I became a volunteer with the California Department of Corrections, working in parole. Everyone viewed me as a rookie cop, so they would give me the real stories. They would tell me about the things that happened in prisons. They would show me how the gangs operated. The most line I kept hearing was, “Make no mistake about it: We might control the doors and gates, but the gangs run the prisons.”

So when did you know you were ready to start making the movies?

I had a running joke with Tucker where he said, “I thought you said it was gonna be a couple weeks of research. It’s turned into two years.” It became this long journey. So when I made “Felon,” I wanted to show what it would be like to survive prison. I met a lot of the guys who had been released out of prison after doing a tremendous amount of time, and how hard it was to reintegrate back in to society. That is where the idea for “Shot Caller” came from. “Felon” and “Shot Caller” were always something I wanted to make together as companion pieces — different men going through the same system with completely different outcomes. The middle ground came when “Snitch” landed in my lap. That wasn’t an original project of mine, but it dealt with the minimum-mandatory sentencing law.

Prison films tend to be very violent, but you showed restraint. Was it important for you to strike a balance?

I would never put it on the same level, but I always saw this film as the prison’s version of “The Deer Hunter.” That movie showed you what war does to men and how they become desensitized to the level of that unbelievable Russian Roulette scene between Christopher Walken and Robert De Niro. To me, that film never took violence to an extreme. It was always done in a emotional way. I don’t want to shock people, and I don’t like exploitation.

How did you land on Nik for the lead role?

I knew I had to get a guy that could straddle both lines — believable as a white collar guy, yet surprise you when they become violent. When I talked with Nik, it really was one of the greatest conversations I’ve had with an actor. All he talked about for three hours was the subtext of the character, what the movie meant and nothing about any of the cool stuff the character would do. It had nothing to do with that. It was all about what the movie was trying to present, and I knew right there I had my partner.

Did you appreciate the film more once you saw that final cut after going through all the Relativity nonsense?

We all say a movie is this massive boulder we pushed up the hill but this was one massive f—ing boulder. It’s a movie that is against the grain of anything anyone wants to put out right now. Every time we were casting around Nik, we would get a certain actor on to the movie and then something would happen with the schedule, or something would happen and we would lose them, be devastated, but then somehow find someone even better for the part.

Then the Relativity of it all happened. First off, I was really excited Tucker was involved and wanted to champion the movie and release it through Relativity. So when the bankruptcy happened, it was devastating. I was reading the trades and seeing a lot of these movies that had been sitting in there for like 18 months and thinking all of this hard work is for nothing.

What did you do at that point?

Luckily, it worked out. The judge let us travel. I didn’t know much of Saban Films when we were looking for a new home — I just thought of Haim Saban and the “Power Rangers” franchise. I ended up meeting with the team at this new independent distributor and had suddenly found partners that were super passionate about the film and understood what the movie was and the marketing enhances it in that way. I feel like we traded up. I knew it wasn’t going to be a massive box office hit but I hope it makes enough to make everyone happy.