Young Bruce Wayne’s caped crusade will not be coming to an abrupt end after all.

In an 11th hour decision, Fox has renewed Gotham for a fifth and final season, TVLine has learned. An episode count remains TBD. The pickup will allow producers to properly “wrap up” the Batman prequel saga, with the final season focusing on Bruce’s transformation into Batman.

Averaging a 0.8 demo rating and 2.62 million total viewers this season (in Live+Same Day numbers), Gotham ranks next-to-last in both measures among all Fox dramas (besting only the recently cancelled The Exorcist).

Starring Ben McKenzie, David Mazouz, Robin Lord Taylor, Cory Michael Smith, Camren Bicondova, Morena Baccarin and scores of others, Gotham airs Thursday nights at 8/7c, with its Season 4 finale set for May 17.

Fox will hold its annual Upfront Presentation to advertisers, where its complete 2018-19 schedule and new programming announcements are revealed, on Monday, May 14 in New York.