It’s a sad day for “Castle” fans as season 9 of the ABC series has been officially cancelled but the network also offered a glimpse of hope for Castle and Beckett fans – a possible spinoff.

The future of “Castle” has been hanging in the balance for the past weeks after Stana Katic’s exit from the show. At the time, there have been reports that ABC has planned to renew the show but for just 13 episodes. However, TheBitBag reported that season 8 might just be the last season for “Castle” after all.

ABC Entertainment President Paul Lee, however, teased of a possible “Castle” spinoff.

Lee revealed at the recent Television Critics Association winter previews that he is already exploring spin-off and other opportunities should lead stars, Katic and Nathan Fillion, not return after the current season, TV Guide wrote.

“We’d love for Castle to keep going for many years to come.There are a lot of conversations going on about how we can do that. I don’t want to give glimpses to where they go, but there are lots of good ideas in there. I’m feeling optimistic that we’ve got some good ideas,” Lee said.

Meanwhile, Fillion, who portrayed mystery novel author Richard Castle, and Katic, who played Capt. Kate Beckett, opened up about their time in the show. Both expressed their gratitude to the fans and their colleagues for their support over the past eight seasons.

“All things must end. It has been an honor working with the men and women of ‘Castle.’ I am truly amazed at what we’ve done. Thank you all,” Fillion wrote on Twitter. The actor also joked about seeking new work, writing a note to “every director,” having more free time, and asked fans to praise his talent. 

Katic, on the other hand, shared a handwritten note addressed to the fans, cast, and crew of the ABC show. “Your devotion to our show has carried us for these unforgettable 8 seasons. I’m lucky to have met and worked with and for the lot of you. I will always be grateful,” she wrote.

Seamus Dever, who played Detective Kevin Ryan, also shared on Instagram a cast photo.

Executive producer Alexi Hawley earlier said fans will get to see an alternative ending in the finale episode of “Castle,”  which will be quite different to what ABC had planned had the series continued to season 9.

“Castle” season 8 finale, titled “Crossfire,” airs Monday (May 16) on ABC.