How 'NCIS' Pulled Off Its Shocking Season 16 Finale Surprise

No, your eyes aren't deceiving you.

Warning: Spoiler alert! Do not proceed if you have not watched Tuesday's season 16 finale of NCISYou have been warned...

NCIS pulled off the ultimate surprise.

In last night's season 16 finale, "Daughters," a blast from the past came back to CBS' long-running primetime scripted drama in epic fashion: Ziva David (Cote de Pablo), who was once presumed dead from a mortar attack, returned to issue a warning to Jethro Gibbs (Mark Harmon) in the season's closing seconds.

"Hello, Gibbs," Ziva says, as she bounds down the stairs in Gibbs' basement. "No time for pleasantries. You're in danger."

Gibbs' shocked expression says it all, as words escape him.

"Well, aren't you going to say something?" Ziva asks, with Gibbs only able to muster a surprised "Ziva?"

Watch Ziva's return below.

So how did producers pull off the stunning season-ending shocker? Only a handful of people knew about the de Pablo surprise, including Harmon, de Pablo and showrunners Frank Cardea and Steven D. Binder. The scene was never actually included in the final script or call sheet, which lays out the day's scenes for production, with only Cardea and Binder holding physical copies of the script pages.

Secrecy was so high that when de Pablo arrived on set to film her special cameo, she entered through a back gate in order to arrive at the NCIS stages. And the scene, which was filmed well after midnight, was completed in front of a skeleton crew after the full crew wrapped for the evening. 

Surprise! Ziva David (Cote de Pablo) is back. - CBS

“This surprise moment is just the beginning,” said Cardea and Binder. “We are thrilled to share that Cote de Pablo will guest star in the NCIS season 17 premiere this fall as Ziva’s warning to Gibbs unfolds.”

De Pablo exited NCIS in 2013 after playing Ziva for nearly nine seasons. Though the season 13 finale revealed that Ziva had died following an explosion in Israel, a body was never found, thus leaving the door open that the beloved character was still living and breathing. That would prove to be true in the 16th season, when field agent Eleanor Bishop (Emily Wickersham) discovered evidence that Ziva was still alive and in hiding.

With Ziva now back in the NCIS orbit and the promise of at least one more episode, we can't wait to see what's in store.

NCIS returns Tuesdays at 8 p.m. ET/PT this fall on CBS.