We are almost to the very end of the prequel story explaining how the Dark Knight in Gotham City came to be. After running on Fox for four seasons, Gotham will be wrapping things up in the upcoming season 5. The final season of the series will consist of 12 episodes, tying up all the loose ends established in the previous episodes of the show. All of the major characters who've managed to make it this far will be returning in the final season, with a notable new antagonist joining the series. To help promote the new episodes, Fox has just released cast portraits for all of these characters, giving fans a peek at the heroes and villains as we'll see them in season 5.

Included in the photos are Jerome Valeska (Cameron Monaghan), Jim Gordon (Ben McKenzie), Bruce Wayne (David Mazouz), Selina Kyle (Camren Bicondova), Penguin (Robin Lord Taylor), Riddler (Cory Michael Smith), Leslie Thompkins (Morena Baccarin), Harvey Bullock (Donal Logue), Barbara Kean (Erin Richards), Lucius Fox (Chris Chalk), Alfred Pennyworth (Sean Pertwee), and series newcomer Bane (Shane West). A well-established villain from the comics, this will mark Bane's introduction on the series as one of the new primary villains. It will be interesting to see how well he fits in with Gotham's most infamous criminals.

RELATED: Why Batman Barely Showed Up in the Gotham Series Finale According to Producers

Each past season came complete with 22 episodes. Compared to only 12 episodes for season 5, the series obviously had more room to explore storylines as they played out in seasons past. In the final season, Gotham is going to need to hit the ground running if they want to wrap up the story and introduce Bruce Wayne as Batman. Still, a shorter season is better than the alternative. Because of lowering ratings, there was no guarantee the series would even come back for a final season, and fans could have been left with the cliffhanger ending of season 4 to end the show. Fortunately, Fox is allowing Gotham just enough time to conclude the storyline, letting the show have a proper ending. Not every television program gets this opportunity.

Gotham may be coming to an end, but the Batman-based prequel stories will continue. A series about a young Alfred Pennyworth is already in the works, following the Wayne family employee in the years before he would eventually become their butler. The show takes place in London in the 1960s, with Alfred serving as a British SAS agent. Despite being another prequel series, however, Pennyworth will have no connection to Gotham, and will feature a new take on the character. This of course means that Sean Pertwee will not be reprising his role on Gotham for the show.

The final season of Gotham will be airing on Fox beginning on Thursday, Jan. 3, at 8/7c. Things were getting really interesting by the end of season 4, so hopefully these last episodes will be just as compelling. Be sure to tune in to see whether Bruce Wayne finally dons the batsuit and if Jim Gordon grows his trademark mustache by the end of the series. These photos come to us from TVLine, and you can take a look at them below!