Fans of Castle said goodbye to their show last night, with the Season 8 finale of the veteran drama procedural serving as a series finale. Castle was one of two surprising cancellations at ABC, along with Nashville, which was axed after four seasons.

During ABC’s upfronts call just hours after the Castle finale aired, the network’s new entertainment president Channing Dungey was asked about the decision to end both shows. She indicated that the efforts made by the studios behind the two shows, ABC Studios (Castle) and Lionsgate TV (leading studio on Nashville, alongside ABCS), to secure renewals during the past month, diverged from the thinking at the network.

Nashville (ABC)“The studios in each case were looking for the best financial and creative ways to help their shows get another season, making plans should they get orders,” Dungey said.

At the same time, “on the network side we were thinking what the best fit on the schedule is and looking at the new development. A lot of the decisions came down to the wire. At the end of the day — even though both Castle and Nashville have been wonderful shows and great performers — we felt that the future for us didn’t necessarily lie in these shows.”

The cancellation of Castle came after ABC sibling ABC Studios had gone through the trouble of making new deals with star Nathan Fillion, as well as co-stars Seamus Dever, Jon Huertas and a couple of others for Season 9. The studio angered some fans when it opted not to bring back co-lead Stana Katic, along with fellow original cast member Tamala Jones.

Meanwhile, Lionsgate TV had stepped in to hire Emmy-winning producers Marshall Herskovitz and Ed Zwick as new showrunners, who already were working with writers on breaking stories for next season.

Lionsgate TV is shopping the series to other networks and digital platforms.