Nathan Fillion has signed a deal to star in the ninth season of ABC's Castle.

Fillion, who plays the titular character, has reportedly finalized a deal to return for another season of the procedural, according to a new Variety report.

The news comes after a turbulent month for Castle fans. ABC announced in April that Stana Katic, who plays Beckett and stars as Fillion's co-lead, will not be returning. This has left many fans frustrated and upset, considering the relationship between Castle and Beckett has been the fabric of the show since the beginning.

Tamala Jones, who plays Lanie, has also been cut heading into season 9. The move to not continue with Katic and Jones was apparently due to budgetary reasons.

Meanwhile, ABC is said to be making the decision on whether to renew or cancel Castle today. Considering Fillion renewed his contract and ABC made such a big announcement about Katic leaving, it seems pretty likely that the series will in fact get a ninth season.

Even if ABC chooses not to renew Castle, though, showrunners Alexi Hawley and Terence Paul Winter have a game plan in place just in case.

"If we hear that we're not coming back, we have shot something that we can put at the end of the episode as a way to put a button on everything," Hawley explained to Entertainment Weekly. "Obviously that would be a bad thing because it would mean no more. We did it in order to try to protect the fans, because you can't end the series on a cliffhanger."

"The hope is that it never sees the light of day," Winter added.

The season 8 finale, which airs May 16, is expected to at least tie up the loose ends presented recently on the series.

 "There will be no more loose ends at the end of the season," Winter assured. "Everything will be answered; all mysteries from previous years will be wrapped up."

Castle airs Mondays at 10 p.m. ET/PT on ABC.

Watch the promo for the next episode of Castle here: