The comedy will be back for its fifth season while the drama will return for its sophomore run.

Fox is returning to the Nine-Nine.

The network has handed out a fifth season renewal to Dan Goor and Mike Schur comedy Brooklyn Nine-Nine, and a season two renewal to the TV adaptation of The Exorcist.

Brooklyn Nine-Nine has always been on shaky ground at Fox. Yes, it's got critics in its corner and a steady audience — but that audience is also modest. And since it's the only Fox comedy produced by an outside studio (Universal Television), the financial reasons for renewing it have never been as compelling as with other modest performers like Last Man on Earth (which has already been renewed) and New Girl (which remains on the bubble).

Still, Brooklyn has given the network one of its bigger celebrity spokespeople in Andy Samberg. And, with an average 1.5 rating among adults 18-49 and 3.3 million viewers, it's no better or worse off than Fox's other bubble sitcoms. Also in its corner is the fact that it's been able to move on the schedule without cratering. Brooklyn may have been back on Tuesdays during its recent fourth season, but it previously launched live-action in the Sunday comedy block that's long been reserved for animation.

The renewal should be seen as a huge win for producers Universal Television as Fox continues to vertically integrate and focus largely on owning its programming. To that end, all six of the network's new series orders for the 2017-18 broadcast season have come from sibling studio 20th Century Fox Television.

For Schur, meanwhile, he'll have two shows on broadcast next season with Brooklyn joining season two of NBC's The Good Place.

The Exorcist had also been somewhat on the bubble after its 10-episode first year run. However, the Friday night fright fest had enough time during its short-order run to build a solid buzz if not a decent viewership a, collecting 5.5 million total viewers and a 1.2 in the demo.

Produced in-house by 20th Century Fox Television, the series based on the feature of the same name will be back as Fox hopes the IP can build buzz and breakout with a second run. The description for season two teases "a new chapter of the iconic franchise."

Keep track of all the broadcast renewals, cancellations and series pickups with THR's handy scorecard.