Spoiler alert: This story contains significant details from Tuesday's season premiere of CBS drama "NCIS."

When Ziva David made her surprise return in May's "NCIS" season finale, she was there to warn Gibbs that his life was in danger. By the end of Tuesday's Season 17 opener, she's pointing a gun at her former boss. 

How's that for a happy reunion? 

A story with life-and-death stakes for someone dear to the former Mossad agent, who was working undercover but thought by many to be dead, was the only satisfactory explanation for the resurfacing of Ziva, says Cote de Pablo, who played the character for eight seasons before leaving TV's most-watched show in 2013.

Reunion story: Cote de Pablo's secret 'NCIS' return: The crew "clapped as I went in ... It was great"

Surprise visitor: Spoiler alert: 'NCIS' closes Season 16 with huge guest shocker


"I remember telling the writers that they couldn't take this character out of her undercover mission unless it's for Tali, her daughter; Tony (DiNozzo, a former NCIS colleague and the child's father); or Gibbs," de Pablo says. "You need to put Gibbs in danger to justify her coming back."

For Ziva and Gibbs (Mark Harmon), who seemed happily gobsmacked at his former agent's surprise appearance, pleasantries will have to wait, as the two almost immediately are taking gunfire in Gibbs' basement and must escape via a secret exit.

Despite Ziva's objections, Gibbs insists on joining her on her mission to find a mystery woman named Sahar who is seeking revenge and "knows the way to get to Ziva is through the people she loves," de Pablo says.

Sahar is "like a ghost. She was involved in some early operations with Ziva's (half-)brother Ari. This relationship was professional and she lost a lot during that and blames Ziva for what happened," de Pablo says. "So, she becomes this horrible nightmare for Ziva and a real threat to Tali," who has been in Tony's care since his final episode in 2016. (Michael Weatherly, who played Tony, now stars in CBS' "Bull.")

Tony's departure: Weatherly is ready to turn in a very special 'NCIS' badge


As the story unfolds – de Pablo returns in the next episode and two more episodes later this season – it will explain Ziva's undercover work and long absence and tie into the character's beginnings on "NCIS."

Sahar "represents something that hearkens back to the initial appearances of Ziva on the show, the full mythology of Ziva and her relationship with Gibbs, what crucible it was formed in," executive producer Steven Binder says. "We wanted the story line to be something that was mythical and tied into the lore of the show."

And while the premiere's story line will expand to reveal a connected terrorist threat in the next episode, "We always bring it back to Ziva and Sahar and the (show's) mythology," he says. "We've tried to make this story come full circle."

Ellie Bishop (Emily Wickersham), the special agent who succeeded Ziva at NCIS, knew she was alive, but other colleagues are shocked by that news, which is revealed to some in a comedy of errors in the autopsy room.