WARNING: The following article contains spoilers for this week's episode of Gotham, "They Did What?," which aired Thursday on Fox.

Over the course of five seasons, Gotham has made it clear that it wasn't adhering to any one version of Batman. Instead of delivering a faithful adaptation of the comic books, it borrowed bits and pieces from movies, cartoons, video games and comics to create an original whole that was difficult to predict.

And yet, for all the liberties the series took along the way, it surprisingly played things safe when it came to the series' penultimate episode, "They Did What?" Rather than delivering a few final shocks or twists, something Gotham has been known to do at every turn, the episode lines up rather perfectly with the Batman mythos fans are familiar with.

RELATED: Gotham: New Look at Cameron Monaghan's Joker Revealed in BTS Photo

Here is a rundown of every major development inspired by the classic comics that took place in the Batman origin series.

A New Breed of Villains

Ever since its beginning, Gotham has not only featured an origin story for Bruce Wayne, but also for two of his biggest enemies: Oswald Cobblepot, the Penguin, and Edward Nygma, the Riddler. Throughout the years, the characters have embraced their iconic, villainous identities. However, their involvement in Season 5 saw both characters painted in a bit of a different light: They were villains, sure, but they were also willing to save Gotham City.

Since "They Did What?" revealed that both Oswald and Ed allied themselves with the GCPD to defeat Bane, it seemed as if perhaps there was a bit of redemption in store for both villains. For a moment there, it looked like all would be forgiven. But that's not the case at all. At the end of the episode, the two characters swear to become bigger and badder villains than they ever were before, setting the stage for their constant presence as some of Gotham City's worst criminals.

Elsewhere in Gotham City, Nyssa Al Ghul, despite being stabbed in the stomach, manages to survive the ordeal. This is particularly noteworthy because Gotham hasn't been shy about killing off Batman villains before. This signals that Nyssa will be around in the future, and she may not return alone. The hulking Bane is also a villain who, surprisingly, survives the season. We are informed that he is incarcerated, which means that he could always return to break out... and break the Batman.

Jim Gordon Gets Everything He Wanted

Jim Gordon may have started out as a GCPD detective, but all of us knew that he would one day become the department's commissioner. After all these years of fighting Gotham City's worst criminals, Jim's leadership skills during the No Man's Land situation, and his devotion to protecting the citizens of Gotham, is what finally gets him the promotion. In "They Did What?," Jim is named the city's new police commissioner, and we know that this will one day lead to an iconic partnership with the Dark Knight.

While Jim and Barbara's daughter went nameless since her birth in the series' last episode, the prevailing theory was that the baby would be named Barbara, as in the future Batgirl. In the penultimate episode, Barbara Kean finally names her daughter Barbara Lee Gordon, after herself, Jim and Leslie Thomkins, the three people she will always be able to depend on. The theory, therefore, is right. Now, Jim Gordon is father to Barbara Gordon.

NEXT PAGE: Bruce Wayne Leaves Gotham... But He'll Be Back

Bruce Wayne Rises

As the episode comes to a close, Bruce Wayne may not suit up as the Batman, but he takes the biggest metaphorical leap that will lead to him becoming the Dark Knight. Once Gotham City is saved from Nyssa Al Ghul and Bane, and the hard work of rebuilding has begun, Bruce decides that his status in Gotham has become too public.

For that reason, he decides to leave everything behind. The final scene of the episode sees Bruce hop aboard a Wayne Enterprises plane and leave his home. He flies away to destinations unknown, but we, as fans, know that these are the travels that will see him train both his body and mind to become a superhero.

Before Bruce leaves, however, Alfred Pennyworth assures him that Wayne Manor and the Wayne Enterprises building -- which were both destroyed in Season 5 -- will be rebuilt. This is, of course, a must, considering that both locations are crucial to the Batman mythos: Wayne Enterprises is where Bruce will one day work as the head of his family's company, and the manor is where he will not only live, but build his secret base of operations, the Batcave.

Furthermore, Bruce's departure creates a rift between him and Selina Kyle. For the past five seasons, the two characters had a sort of off-again, on-again relationship. They were friends, rivals, enemies and eventually partners. In Season 5, they grew closer than ever, to the point that it was hard to see how the two could become the classic frenemies they are in the comics. The answer, however, comes when Bruce leaves Gotham City -- and Selina -- behind. The young Wayne doesn't warn Selina of his departure, instead opting to leave her a goodbye letter.

This will undoubtedly create tension between the two. When Bruce inevitably returns home, he will find a former friend, an estranged acquaintance who will more than likely want nothing to do with him. And this, in turn, will lead to a more classic Batman/Catwoman relationship.

RELATED: Gotham's Dark Knight Officially Rises in Series Finale Poster

In some ways, "They Did What?" is a finale of its own. It caps off the No Man's Land/Zero Year storyline that's been unfolding ever since the start of Season 5, and it ends with a scene that could have easily been the conclusion to the Batman origin series. The actual Season 5 finale, which will take place 10 years in the future and feature an established Batman, is therefore a sort of bonus episode, a way for Gotham to have its cake and eat it, too.

Airing Thursdays at 8 p.m. ET/PT on Fox, Gotham stars Ben McKenzie as James Gordon, Donal Logue as Harvey Bullock, David Mazouz as Bruce Wayne, Robin Lord Taylor as Penguin, Camren Bicondova as Selina Kyle, Erin Richards as Barbara Kean, Sean Pertwee as Alfred Pennyworth and Shane West as Bane.