There will be a happy ending for The Mentalist. After sitting heavilyMentalist Renewed Season 7 on the bubble for the first time, in grave danger of cancellation, the veteran drama has gotten a reprieve with an eleventh-hour renewal. CBS does not specify the size of the order but I hear it is likely for a 13-cbs-logo__120711164808__121116195436__130108233101__130716162250__130926192712__131121001522episode seventh and final season. That also would make sense given the enormous (for CBS standards) volume of new dramas that the network is adding with the pickup of six new series: NCIS: New Orleans, CSI: Cyber (likely one for fall one for midseason), Stalker, Scorpion, Madam Secretary and the straight-to-series Battle Creek.

Related: CBS Cancels ‘The Crazy Ones’, ‘Friends With Better Lives’, ‘Bad Teacher’, ‘Intelligence’ & ‘Hostages’

The Mentalist creator Bruno Heller is segueing to his new Fox series Gotham, but I hear he will see his baby off, sharing co-showrunner duties with one of his lieutenants, Tom Szentgyorgyi. Simon Baker is set to return as he has one more year on his current contract. With the renewal of The Mentalist, CBS will be bringing back all 10 drama series that were on its fall schedule last season, plus 6 new ones vs 3 last season. Expect multiple split windows/limited runs and possibly dramas reclaiming a comedy hour.

Related: ‘The Mentalist’ Explores New Homes If No CBS Renewal

With the futureMentalist-season6-newslogan at CBS in serious doubt, The Mentalist producer Warner Bros TV had been quietly shopping the series to other networks. Mentalist is a very important property to the studio with its $2 million-plus-per-episode off-network deal at TNT and big international sales including in France, where it is the No. 1 scripted series. The Mentalist started off as a CBS darling, landing the post-NCIS Tuesday PM slot for its launch before moving to Thursdays 10 PM. But after four seasons on Thursday, the series was moved to the Sunday 10 PM slot. Despite often airing outside of primetime because of sports overruns, in its current sixth season, Mentalist has averaged of more than 11 million viewers and a 2.1 rating among adults 18-49, outrating in the demo its Sunday night lead-in The Good Wife, which has been renewed.

The Mentalist underwent a largely well received creative reboot midway through the current season, wrapping the 5 1/2-season-long Red John mystery and moving some of the key players to Texas.