Fans of Gotham breathed a sigh of relief that the Fox network didn't cancel it. Instead, TV's Jim Gordon and Bruce Wayne will get to fight the good fight for one more season. The network made the announcement on May 8 during the annual Upfront Week presentations, which is when the network parades its stars and producers before Madison Avenue ad executives to entice them to buy commercials. The good news for Gotham is tempered, though: the next season order is for only 13 episodes, not 22, and after that, Gotham will come to an end.

Why couldn't Gotham go on longer? It's based on the origin of one of the most popular characters of all time. Since 1940, Batman has conquered all media -- comic books, serials, animated television, live-action TV, movies, video games and even Lego toys. But Gotham has struggled to find its footing, and was buffeted by the competition. Many factors, though, go into the effort to mount a TV series, and all parties want to see it succeed -- and to last -- so decisions to bring any given show to an end aren't easy or made lightly. Here, CBR looks at the reasons why Gotham got one more season, and no more.

15 IT'S NOT SMALLVILLE

Gotham -- Smallville

The successful model for the long-running origin-that's-not-an-origin series is Smallville. It debuted in 2001 on the WB network, survived the 2006 merger of WB and UPN that spawned the CW, and continued on as a mainstay of the CW lineup to 2011. Smallville, starring Tom Welling, focused on young Clark Kent's life before he adopted the mantle of Superman. Ironically, Smallville was developed after a proposal for Bruce Wayne, a TV show about the title character's teenage years, fell through the cracks in 1999. At the time, Warner's TV division was interested in the show, but the movie division had plans to recover from the 1997 flop Batman and Robin. Under consideration were adaptations of The Dark Knight Returns and "Batman: Year One."

Smallville lasted for 10 seasons, with producers Alfred Gough and Miles Millar invoking a "no tights, no fights" rule, keeping Kent from appearing in costume until the series finale. Although Gotham had a similar notion of exploring Bruce Wayne's past, it just couldn't hold off on the moment when Wayne becomes Batman and keep the viewers interested for nearly as long. The show plans to move toward Wayne fully taking up the mantle of the bat during the fifth season.

14 TOO HARD TO JUMP IN

Gotham-Cast

Despite being based on the same idea -- Bruce Wayne's early, pre-Batman years -- 2014's Gotham is not the show 1999's Bruce Wayne might have been. Gotham begins with Thomas and Martha Wayne being murdered, and a rookie detective being assigned to the case: James Gordon, who has been away from town after years in the military. Initially, Gotham was more of Gordon's origin story, as he delved into the Wayne murders and found the Gotham Police Department to be incompetent and corrupt, and struggled to navigate an environment where warring factions of mobsters hold sway over the city.

Gotham also introduced the origins of several Batman rogues like The Penguin, The Riddler, The Scarecrow and Solomon Grundy, and created new crooks unique to the series like Fish Mooney and Professor Pyg. It moved away from being a police procedural in superhero drag, where Gordon and his few allies try to take down the establishment and he does more and more dirty deeds in the name of cleaning things up. Mining the comics lore willy-nilly, Gotham brought in the Court of Owls, and loosely adapted The Long Halloween maxiseries and The Killing Joke. It has developed its own continuity, making it hard to reconcile this version of Batman with any other -- and thus makes it hard for new viewers to find a jumping-on point.

13 NO CROSSOVER POTENTIAL

arrowverse

At the CW network's 2018 Upfront presentation to advertisers in May, Arrow star Stephen Amell announced the next Arrowverse crossover will come in December and will feature Batwoman. Not only that, CW President and CEO Mark Pedowitz said, "We are adding the city of Gotham into the Arrowverse." Putting Batwoman in the next Arrowverse crossover comes too late to help Gotham, which could have used the boost in viewership that these events bring. Arrow and Supergirl have thrown out hints that there is a Gotham on their respective worlds. Plus, Oliver Queen once publicly name-checked Bruce Wayne and as Green Arrow has had his hands full over the years facing off against Batman villains such as Ra's al-Ghul. But Gotham being on Fox, is isolated from the Arrowverse.

And without a link to those shows, Gotham has missed out on opportunities to grow its audience, because the three Arrowverse crossovers have been big hits for the CW. The first crossover of Arrow and The Flash was in 2014; the second in 2015 introduced the Legends of Tomorrow and spun the team off into its own series. The "Invasion" from 2016, and 2017's "Crisis On Earth-X," involved the three shows and Supergirl, which moved to the CW network from CBS in its second season. "Invasion" gave the CW its highest-rated week in six years.

12 THE BIG SCREEN ALWAYS COMES FIRST

Gotham -- the movie Batmen

Warner Bros. Television has a mostly successful slate of shows on the air based on DC Comics and Vertigo properties -- Arrow, The Flash, Supergirl, Legends of Tomorrow, Black Lightning and I-Zombie. Exceptions are Lucifer, which bit the dust this season, and Constantine, which had a single season on NBC in 2014-15. But even with those hits, as well as the long-running Smallville, Warner has always seemed to emphasize its movie slate of superheroes over its TV offerings. Smallville got on the air in 2001 after multiple failed attempts to reboot the Superman movie franchise after the 1987 flop Superman IV: The Quest for Peace. Smallville also introduced a prototype Justice League, but efforts to do more with Smallville's versions of the Flash, Green Arrow, Aquaman and Cyborg never went anywhere.

More recently, Arrow introduced Amanda Waller, but killed off the character ahead of her appearance in the Suicide Squad movie, played by Oscar winner Viola Davis. And there was controversy that TV's Flash, Grant Gustin, had no shot at playing the character on the big screen in Batman v. Superman: Dawn of Justice or Justice League. The pending end of Gotham clears the slate as Warner's tries to get the Batman movie franchise back on track, after Justice League underperformed at the box office. And Gotham has introduced a character who is The Joker in all but name -- but that name can't be used on the TV show because of plans for him in the movies.

11 THE MOUSE AND THE PEACOCK WANT THE FOX

Gotham -- Disney, 21st Century Fox, Comcast logos

In December 2017, the Walt Disney Company announced it intended to buy 21st Century Fox, paying $52.4 billion in stock. The deal calls for Disney to get Fox Entertainment Group, which includes 2oth Century Fox, Fox Searchlight Pictures, Fox Sports Networks and other production studios; Fox's 30 percent stake in Hulu; the FX Networks; a 73 percent stake in National Geographic Partners; and other assets. The Fox Broadcasting Company, Fox News Channel, Fox Business Network, MyNetworkTV, Fox's sports channels and its 28 TV stations will spin off into an entity informally called "New Fox."

Big as this deal is, Comcast/Universal announced on May 23 that it plans to top Disney with an all-cash bid “at least as favorable to Fox shareholders as the Disney offer.” Comcast didn’t give a final number, but it likely would be enough to cover the $1.52 billion breakup fee Fox would have to pay if it rejected Disney. Comcast already made an offer for another Fox subsidiary, satellite broadcaster Sky. Even though it can take 12 to 18 months for this deal to wend its way through the regulatory process, Fox Broadcasting is already reshaping its future. What this means is Fox will de-emphasize scripted programming, double down on news, sports and reality programs, and give even more of a priority to having its own shows on its own air. It's a new environment that leaves less room for a show like Gotham, which isn't made in-house.

10 A GUEST AT MARVEL?

The Walt Disney Company bought Marvel Entertainment in 2009 for $4 billion. The benefit of that deal was to provide source material both for its film studios and its television networks. The strategy has been a success; Marvel's movies are the gold standard for superhero films, which generally are popular, mostly are positively reviewed, and lucrative. And most of Marvel's superhero TV shows, whether on broadcast channels like ABC or streaming services like Netflix are linked to the Marvel Cinematic Universe.

On the other hand, Warner's superhero TV shows don't have a similar reach. Most are on the CW, which is a joint venture of Warner Bros. Entertainment and CBS. But the CW pulls in an average of only 1.89 million viewers for all of its programs, fifth behind CBS (9.7 million), NBC (8.2 million), ABC (6.2 million) and Fox (6.0 million), according to The Wrap. Placing Gotham on Fox automatically gave it a better shot at a bigger audience than the CW can offer. But with the Fox network retooling to focus on reality shows and sports in the wake of the Disney deal, how much support can DC shows get there? Danette Chavez, the AV Club's TV editor, tweeted "#Lucifer and #Gotham fans: no word yet on renewals, but Fox CEO says there's no plan to cut ties with DC shows just because of the network's new Marvel connections. #TCA18" -- but Lucifer still got canceled.

9 NO THURSDAY NIGHT HOME

Gotham -- Thursday Night Football

For its first three seasons, Fox carried Gotham on Monday nights. For Season 4, it was switched to Thursdays. But Thursdays are off the table for Gotham or any scripted programming on Fox for a huge chunk of the year. In January, the network reached a deal with the NFL to carry Thursday Night Football, which moves from NBC and CBS. Fox will devote 30 more hours on its slate to football, carrying 11 games on Thursdays on its broadcast network beginning with the fourth week of each season. excluding Thanksgiving. It will also produce seven more games for the NFL Network, and add to its coverage of the NFL draft and other game-related events.

Fox Sports will pay $3.3 billion over five years or about $650 million annually. That is $200 million more each year than NBC Sports and CBS Sports, which shared the package, paid the previous year. Even though football is slumping -- NBC and CBS are losing money on their football package -- Fox paid big for the NFL package because it needed a proven ratings-getter after it will shed 21st Century Fox and shift its overall focus to sports and reality programming. Plus, from the beginning, Fox has a lower footprint on the air and fewer time slots each week because its prime-time schedule ends at 10 p.m., whereas rivals ABC, CBS and NBC program up to 11 p.m.

8 NOT A FOX SHOW

Gotham -- Warner Bros. logo

Gotham is produced by Warner Bros. Television, not Fox. This made it less valuable and more expendable to the network than many of its other programs. Since the rules that forbade TV networks from producing and owning shows were undone in 1993, networks have tended to favor shows that are produced by another part of the corporate family over shows produced elsewhere. That's because if a show is a hit when it reaches syndication or goes to a streaming service, the company would rather not see the windfall go to some other outfit. If a show is a really big hit -- like, say, Seinfeld -- it could even cover the costs from the shows that didn't make it to 100 episodes and weren't syndicated.

Accordingly, six of the nine dramas on the 2017-18 Fox lineup -- 9-1-1, Empire, The Exorcist, The Resident, Star, The X-Files -- are produced by 20th Century Fox Television. Two, Gotham and Lethal Weapon, are produced by Warner Bros., and the third, The Gifted, is a joint venture of Fox and Marvel Television. It's hard enough for any show with slipping numbers to justify its continued presence on the lineup, but all things being equal, the edge often goes to the show where the network at least has a stake in it, if it doesn't own it outright. Gotham doesn't have that edge with Fox.

7 LETHAL WEAPON

Gotham -- Lethal Weapon

Going into the 2018 Upfronts on May 8 -- the annual ritual in which the networks present their slate of shows to advertisers -- things looked iffy for Gotham and for Lethal Weapon, its sister show from Warner Bros. Television. Both were on the bubble, with frantic deal-making behind the scenes to keep them afloat. Lethal Weapon, in its second season, is a newer show and gets better ratings than Gotham, averaging 4.113 million viewers and an average 0.99 rating in the 18-49 demo. The issue with Lethal Weapon was co-star Clayne Crawford, whose on-set conduct caused him to be reprimanded more than once and blamed for "emotional abuse and creating a hostile environment," according to Deadline Hollywood Daily.

Crawford's behavior put the show's renewal in jeopardy, until the network and producers explored firing him and recasting the role. In the days before the upfronts, Crawford did get the boot, but it took a while to find his replacement. This went on as the deal was being worked to give Gotham one more season. According to The Hollywood Reporter, Fox prepared to renew Gotham and cancel Lethal Weapon if it couldn't line up another actor for by the upfronts. But Gotham got its 13-episode deal, and at the 11th hour, Lethal Weapon signed Seann William Scott to play a new character.

6 NO MAN'S LAND

Gotham -- No Man's Land

Gotham's fourth season ended with the city isolated from the rest of the world. This sets up a different status quo for Season 5, following the blueprint left by "No Man's Land." That storyline was a sequel to "Cataclysm," in which Gotham City was hit with a massive 7.6 earthquake. After that and the outbreaks of infectious disease Gotham suffered in the 1996 "Contagion" and "Legacy" crossovers, the federal government refuses to rebuild the city. It declares Gotham no longer part of the United States, puts a fence around it and blows up the bridges and tunnels to keep people out. "No Man's Land" watches the people who didn't follow orders to leave: rival criminal gangs engaging in turf battles, and a ragtag group of Gotham Police officers trying to keep order, with the help of Batman and his team.

"No Man's Land" wound through the Batman titles and various spinoffs in 1999, including Batman: Harley Quinn, which created the DC Universe version of the animated character. Gotham executive producer Danny Cannon told Comicbook.com that the story was a good way to upend viewer expectations. "Our characters have reached a maturity now; our characters are so well-defined, and that's why I think as writers, that's right about the point when you want to change people's perception of them. The [term] 'reboot' means, just when you thought you knew people, something else will happen, and just when you thought your Season 5 would be like Season 4, Season 5 is completely different."

5 OLD ENOUGH?

Gotham -- Bruce vigilante costume

David Mazouz was 13 years old when he began as Bruce Wayne on Gotham, which was fine for a show that was about his early years after the murders of his mother Martha and father Thomas. In most versions of the Batman legend, the murders happen before Wayne is a preteen, and he spends several years in training across the country and around the world before he adopts the mantle of the bat -- in his early twenties. Although Mazouz has capably handled all that Gotham has thrown at him in four seasons, today he is just 17.

Season 4 has had Wayne begin excursions as a vigilante, complete with a high-tech all-black costume from Lucius Fox that disguises his identity. But even though Season 5 will accelerate Wayne's journey as a superhero, Mazouz just doesn't have enough seasoning yet to be The Batman. How can the show pull that off? Mazouz has his own idea, which he told to Discussing Film's podcast. "I would love to see the show end with Bruce Wayne in a Batsuit on top a building looking down, with a Bat-Signal on top of Gotham Central ... [with] everybody, not just Bruce, coming into the characters they're supposed to be." Further, he said "I'd love for that last shot to be Bruce putting on the Batsuit. That's just my personal preference, but I don't know if that's allowed or realistic. I don't know what's actually going to happen."

4 PENNYWORTH

Gotham -- Alfred Pennyworth

Soon after the news that Gotham will head to the finish line, the pay channel EPIX announced another Batman-adjacent show focusing on a key part of his past. Pennyworth will spend 10 episodes exploring the background of the faithful Wayne family butler, Alfred Pennyworth. The series will cover Alfred's life after he retired from being a special forces soldier. After leaving the British Special Air Service, Alfred moves into private security, launching a company with noted Gotham billionaire Thomas Wayne. This loosely follows the backstory given for Alfred in the Batman: Earth One series of graphic novels.

Pennyworth is produced by Warner Horizon Scripted Television, and created by executive producer and writer Bruno Heller, and fellow executive producer Danny Cannon will direct the pilot. Those two gents did the same for Gotham, but Pennyworth is not a spinoff; it isn't even set in the same universe. Sean Pertwee, who plays Alfred on Gotham, is not part of the new project, which is set in London in the 1960s. EPIX President Michael Wright said, "We can't wait to work with Bruno and Danny -- along with Peter Roth, Susan Rovner, Brett Paul and the team at Warner Horizon -- on this fantastic origin story."

3 RATINGS

Gotham -- Bullock and Gordon

Gotham debuted on the Fox network on Sept. 22, 2014. It drew 8.3 million viewers and up to 22 million viewers in the first 30 days after that date, according to Variety. About 8.9 million saw the pilot on video on demand within three days or by DVR playback within seven days. Plus, the pilot gained 5 million viewers through VOD after the fourth day or online via Fox Now or Hulu. Fox said that those 5 million viewers represented 23 percent of the total audience, and was the largest group to watch a Fox show that way in the previous three years.

For that debut season, Gotham averaged 7.56 million viewers and a 2.8 rating in the 18-year-old to 49-year-old age demographic. After that, the show couldn't keep its high numbers. For the second season, the show averaged 5.37 million viewers and a 2.0 18-49 demo. In the third, the numbers were 4.52 million viewers and a 1.6 18-49 demo. In Season 4, the show was moved from Mondays to Thursdays, which didn't help; it averaged 2.62 million total viewers and a 0.8 demo rating, in Live+Same Day numbers. Only The Exorcist performed worse for Fox, and got canceled for it. However, Gotham does well with multi-platform viewers. In Season 4, it hit 5.8 million viewers through multi-platform, up 115 percent over its Live+Same Day viewership. That why there was interest in keeping it alive for one more year.

2 NOTHING LASTS FOREVER

With this final season, Gotham will have a five-year run -- not terribly short but no record-breaker. But the economics of television production has changed over the years, so it isn't necessarily desirable to keep a show on the air for years and years. Any given show can stay on the air indefinitely, if the ratings are good, the production costs can be kept under control, and everybody -- the stars, the producers, and the network -- are willing.

The Simpsons, for example, has been going strong for nearly 30 seasons, ever since 1988, by following that formula -- although there have been moments where the voice actors and the producers have struggled through negotiations over salary increases. At least once, in 1998, the network prepared to replace the entire cast rather than boost their pay from $30,000 per episode. By 2008, the actors were making $400,000 per episode, but they agreed to 30 percent pay cuts three years later, which secured a two-year renewal for the show. For another example, the original Law & Order became well-known for its frequent cast changes. That not only kept the show fresh over life span from 1990 to 2010, it held the budget down.

1 100 EPISODES

With the 11th-hour renewal, Gotham will have reached the milestone of 100 episodes at the end of Season 5. Not only is 100 a nice, round number, it is the modern threshold for a show to have a shot at success in rerun syndication. In syndication, a bloc of reruns can be "stripped" -- that is, scheduled at the same time each day for five consecutive days a week, sometimes six. The old benchmark used to be 65 episodes, but with 100 episodes, up to six months can pass before any given show runs out of episodes and needs to start over.

There are shows that are successes in syndication that are short of 100 episodes. Probably the most famous example is the original Star Trek, which struggled to get to 79 episodes, but became so popular it led to multiple spinoff TV shows and movies. And there are shows that cease production because they have more than enough episodes to work with. Part of the reason NBC canceled Law & Order was that TNT, which carried its reruns, was uninterested in helping produce new episodes to add to the 20 years' worth it had in the can. Another example is Star Trek: The Next Generation, which debuted in 1987; it was originally slated to run for eight years, but Paramount pulled the plug in 1994 to shift the cast into feature films.