Fox’s Gotham took the Batman mythos in a different direction than what we’ve seen on screen before. The series, entering its fifth and final season on January 3, began as the story of rookie detective Jim Gordon (Ben McKenzie) investigating the Wayne murders. But it soon grew to contain some of Batman lore’s most infamous villains, including Carmine Falcone (John Doman), Oswald Cobblepot (Robin Lord Taylor), and Edward Nygma (Cory Michael Smith) — the latter two characters introduced long before they adopted their villainous personas of the Penguin and the Riddler — and the completely new mobster villain Fish Mooney (Jada Pinkett Smith).

From there, it got crazier. Gordon’s long-suffering girlfriend Barbra Kean (Erin Richards) became a villain herself. Comic-book baddies like Hugo Strange (B.D. Wong) and Mr. Freeze (Nathan Darrow) appeared, rankling the continuity sensibilities of comic book purists, while delivering a stranger tale than Gotham initially wanted to tell. And through it all, Bruce Wayne (David Mazouz) grew from a shattered boy into a man on the cusp of becoming the Batman.

(Photo by Justin Stephens/Fox)

Gotham’s final season, billed as “Legend of the Dark Knight,” promises the arrival of Batman, an event that will bring the series full circle as Bruce and Gordon take on the city of Gotham’s corruption as equals. In fact, the season may see them as equals even before Bruce becomes the Batman.

Mazouz had just wrapped filming on the series when Rotten Tomatoes spoke with him, but he had not yet adjusted to the idea that his days as Bruce Wayne had come to an end.

“I’m trying not to think about the fact that it’s over, because otherwise I’m gonna start getting emotional,” he said.

For Mazouz, who began working on the series at age 13, Gotham’s final season offered one last twist to his character that he never expected to take on: the cape and cowl of the Batman.

“I was thinking of the fact that most shows never go past the pilot,” he recalled. “It’s so hard in this business to ever think long term, because you never know what’s going to happen tomorrow. And so the fact that we’ve made it here five years later — and Batman will appear — is kind of incredible.”

The original premise for the series saw Gordon facing the corrupt Gotham City Police Department while attempting to solve the Wayne murders. But things changed quickly as Mazouz’s Bruce Wayne became more tied to the investigation, and Gotham explored a still-grieving Bruce in the immediate wake of the tragedy. The attempt to process his grief led to some of the obsessive qualities fans recognize in Batman, and it made him uniquely suited to investigate his father’s company in way Gordon could not. Bruce’s quest for answers put him on a surprising journey, which meant Mazouz spent more time in Bruce Wayne’s developing psyche than any other actor who has played Batman.

“I think it’s just a more human process,” he said of Bruce’s journey to masked vigilantism in the fourth season, and the persona his character will take on by the series’ end.

(Photo by Justin Stephens/Fox)

While Gotham goes on wild tangents to introduce members of Batman’s varied and colorful rogues’ gallery, those stories helped to underscore the original tragedy of Bruce Wayne, Mazouz said.

“It’s a story that Gotham tells over and over again; people losing something and having some kind of tragic moment to them. We saw it with Penguin, we saw it with Riddler, where things happen to them that aren’t justified. The question is: What does a person do with those things after it happens? Bruce is able to turn that vulnerability into strength. He’s able to say, ‘I suffered this. I don’t want anybody else to do the same,’” the actor said.

Villains like Penguin and Riddler, meanwhile, take those losses and decide “[they] want other people to know what that feels like. [They] want other people to suffer too.” That dichotomy reverberates from their Gotham portrayals into the comic-book reality of Batman.

Before Bruce can finally adopt his famous identity, he must navigate a Gotham City undone by Jeremiah’s (Cameron Monaghan) attack on the bridges connecting the city to the mainland. Taking its cues from the 1999 No Man’s Land comic book storyline, the series picks up a couple of months after the bombings with “the entire city in complete anarchical disarray,” Mazouz said. Gangs have turned sections of the city into their own little fiefdoms. And while the GCPD try to help as many people as they can without federal support, the situation on the ground is grim.

“There’s no electricity. There’s barely any food. They’re running out of water. They’re running out of medicine. Everybody is trying to get their hands on bullets,” the star explained.

Bruce, for his part, attempts to aid Gordon and the Gotham City Police Department “any way he can” while maintaining a vigil over the still-injured Selina (Carmen Bicondova) as the season begins. And with the doctors saying she will never walk again following her encounter with Jeremiah at the end of season 4, Mazouz said Bruce is faced with “a mighty choice”; he can save her life, but as teased in previews, that life will be significantly altered. Nonetheless, the actor suggested their relationship will weather through “in the truest of Bruce and Selina fashion.”

“I don’t think their relationship’s ever been fully smooth or fully rocky for any extended period of time. It’s very unpredictable,” he added.

Of course, that rockiness could be accentuated as the characters move closer to their comic book counterparts, the trajectory many Gothamites face in the final hours of the series.

“As the season continues you’re going see everybody dressed in more traditional comic costumes,” Mazouz said. “Everyone’s going just be inching ever closer in their look and in their actions. It’s really exciting to watch.” Gotham’s signature feel will remain, but the characters will be “off by a little bit” as the series and the style of Batman comics collide.

(Photo by Justin Stephens/Fox)

He also teased Bruce would have a “significant storyline” with Eduardo Dorrance (Shane West), an old Army buddy of Jim Gordon’s who turns out to be Batman nemesis Bane.

Despite the knowledge that the season would be Gotham’s last, Mazouz said the production environment was very much the same: a busy set full of dedicated people.

“This cast, this crew has been a second family to me for the last five years,” he said. “I think we all just cherished every moment with each other more, knowing that the days were coming to an end.”

Gotham airs Thursdays at 8 p.m. on Fox.