WARNING: The following article contains spoilers for the latest episode of Gotham, "Ruin," which aired Thursday on Fox.

There's no shortage of Batman foes on Gotham, particularly in this fifth season, which adds the Mutant Gang, a proto-Harley Quinn, and Bane, for starters. Joining the likes of the Penguin, Scarecrow and Mister Freeze in a fight for territory in a fractured city, they will no doubt play important roles. However, the focus on those colorful criminals may only be a smoke screen for the Fox drama's true villain.

With this week's episode, "Ruin," the series reveals the mastermind of its final season is none other than Edward Nygma, aka The Riddler.

RELATED: Gotham's Penguin Will Look Like the Comic Version By the Series Finale

There's been a mystery brewing since the season premiere: Someone, whose identity was kept secret, has been fighting a war from the shadows, sparking confrontations and causing the deaths of many. It began when a Wayne Enterprises helicopter was shot down by an unknown assailant using a rocket-propelled grenade (RPG). Then, in last week's episode, "Penguin, Our Hero," the Gotham City Police Department's Haven was bombed in an explosion that leveled an entire block and killed dozens of refugees.

In "Ruin," we learn Haven was destroyed by another well-placed RPG. As the episode ends, it's revealed Edward Nygma pulled the trigger himself.

Riddler in Gotham Season 5

That revelation cements The Riddler as arguably the most dangerous villain of the series, and the primary antagonist of the final season. After all, he's taken more lives than anyone so far. What's more, this reveal actually makes a lot of sense.

The final season draws inspiration from the DC comic book crossover "Batman: No Man's Land,", but also the more recent "Zero Year" arc by Scott Snyder and Greg Capullo. The latter provides a modern take on Batman's origin story, and his first mission to save Gotham from The Riddler, who flooded the city after taking control of its electrical grid.

RELATED: As Promised, Gotham Finally Debuts Its Harley Quinn

Of course, the city isn't flooded on Gotham, but the parallels are apparent. "Zero Year" positioned The Riddler not only as its main antagonist, but also as one of the bigger threats in Batman's rogues gallery. No Gotham appears to be doing the same.

Edward Nygma has been a part of the series since its pilot, when he was little more than a bumbling forensic scientist for the GCPD. His path to becoming The Riddler has mirrored that of many other characters on Gotham who are moving closer to their comic book destinies.

Now, he's the biggest threat to Gotham City, leaving viewers with an enigma: Who can stop him?

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 and Sean Pertwee as Alfred Pennyworth.