Jon Bernthal has played cops, criminals, and everything in between. But his role in the HBO limited series “We Own This City” presented a new challenge for the celebrated actor.

The series is based on the nonfiction book of the same name by Justin Fenton. It tells the story of a group of corrupt Baltimore police officers who worked on the city’s Gun Trace Task Force (GTTF). It was eventually discovered that the officers routinely violated citizens’ rights, stole money they seized in drug raids,  and even resold drugs back onto the street.

Bernthal stars as Sgt. Wayne Jenkins, a leader of the GTTF who was eventually sentenced to 25 years in prison. The actor says that he was most concerned about not simply portraying Jenkins as a one-dimensional “monster.” Instead, he spoke to Jenkins, his fellow officers and even his victims to develop a more nuanced portrayal of the man behind the headlines.

“The first thing [Jenkins] said to me is ‘You must think I’m the worst guy on Earth.’ I said, ‘Look, Wayne, everybody told me you’re a good father,’” Bernthal says. “And to me, there’s nothing more important to me than my kids. So that was a real access point where I really could latch on to him as a character.”

The biggest draw for Bernthal to join the series was the chance to explore systemic issues in American policing that have been laid bare in recent years following protests against police violence in cities including Ferguson, Baltimore and Minneapolis. He felt that this show would be particularly resonant since it hails from the team behind “The Wire,” a series Bernthal refers to as a “sustained and cogent meditation on crime, the war on drugs, inner-city poverty and policing.”

“David Simon and George Pelecanos approach their work with journalistic integrity,” he says. “So for me to have the opportunity to explore these issues with the level of rich nuance that these guys do was an opportunity that I wanted to jump on.”

As the six- episode series unfolds, viewers see again and again how Jenkins not only regularly broke the law during his career, but was repeatedly protected by higher-ups in the department as they viewed him as an effective officer who could make arrests and put drugs and guns in front of the cameras.

As Bernthal and the series lay out, a police work slowdown occurred in Baltimore following the decision to charge the officers accused of killing Freddie Gray in 2015. In the years that followed, Jenkins flourished.

“It was almost like an athletic contest,” Bernthal says. “How many arrests did you make? How many drugs did you get off the street? How many guns could you seize? And so, he was doing the very thing that he was set out to do [by the system].”

From there, Jenkins allowed “his greed to take over and became unbelievably corrupt, vile and wicked,” Bernthal continues.

But Jenkins’ actions were not just confined to his own life. As the series demonstrates, he corrupted other officers by showing them the ropes as he had learned them, which included theft and lying about probable cause to effect arrests. In one such scene, he offers a member of his team (played by Jamie Hector) a brick of cash after they successfully raid a drug operation, arguing that they deserve the money given the risks that they take.

“What he’s saying is, ‘Look, don’t we deserve more?’” Bernthal says. “And whether you agree with that, or you don’t agree with it, it’s my job to understand and empathize with it.”