Stana Katic is set to return to “Castle” for its eighth season, Variety has learned. The star has closed her deal, after long negotiations.

Season 8 will not be the final season, according to ABC boss Paul Lee who commented on a Tuesday morning press call: “Not the final seasons of either,” when asked about “Castle” and “Grey’s Anatomy.” He added, “I would like to see them run for many, many seasons to come…they have incredibly passionate audiences.”

For Season 8 of “Castle,” Katic’s co-star Nathan Fillion is also set to return, finalizing his contract before his female lead back in April. Both actors’ — “our two beloved heroines and heroes,” raved Lee — contracts were up at the end of Season 7. The ink has also dried on contracts for Seamus Dever and Jon Huertas, who have both been on the show since the beginning.

Season 8 will see a shift in showrunner, as David Amann is stepping down. Amann held the position for one season, as he took the reins from series creator Andrew Marlowe after the sixth round of the crime procedural.

“Castle” producer and writer Terence Paul Winter and Alexi Hawley — creator of Katherine Heigl’s NBC political drama “State of Affairs,” which was canceled last week — will serve as co-showrunners.

The drama, which is a solid performer for ABC’s Monday night lineup, was renewed, along with a slew of over 20 returning series last week.

Katic is repped by Gersh.