Booth and Brennan will solve their last case in the 12th season of "Bones." Fox announced on Thursday that it had renewed the comedic procedural for a 12-episode farewell season.

David Boreanaz and Emily Deschanel also renewed their contracts and will return as FBI Special Agent Seeley Booth and Dr. Temperance "Bones" Brennan. Showrunners Jonathan Collier and Michael Peterson, who took over the show this season, will take up the same post next season.

"We couldn't be more thrilled to have another season, so we can give the show, characters and fans the end they so richly deserve," Collier and Peterson said in statement. "Also knowing there is a Season 12, we can now write the most rewarding Season 11 finale possible - one we hope will leave our fans excited for what's to come in this final season of 'Bones.'"

"Bones" will finish with a total of 246 episodes when the series wraps during the 2016-2017 season, making it one of the longest running Fox series ever. The pitch for a 12-episode final season went out in early February and was met with "almost immediate positive feedback" from Boreanaz and Deschanel, according to Deadline.

"This is for the fans! Thank you to everyone at Fox and of course, Dana [Walden] and Gary [Newman] - for all your support," Boreanaz said in a statement. "Thank you to Hart [Hanson], Stephen [Nathan], Ian (Toynton), Michael and Jonathan. Also to the crew and cast for their countless support along the way! And I couldn't have done it without you, Emily!"

His co-star Deschanel added, "I am thrilled the show will have the ending it deserves for all of our amazing, loyal fans!"

"Bones" will return for its midseason premiere on Thursday, April 14 at 8 p.m. on Fox.

The episode titled "The Death in the Defense" will find Hodgins (TJ Thyne) eight weeks into his rehabilitation and forced to navigate life in a wheelchair. Brennan and Booth will investigate the death of a public defender who had multiple defendants from previous cases with motives to kill her.