WARNING: Spoilers ahead if you haven't watched the finale of Homeland yet.
Last-minute finishing touches were being put on the Homeland season finale just last Thursday.
But the big, bold plot point of Sunday's episode, in which viewers saw main character Nicholas Brody (Damian Lewis) publicly executed, had been decided and planned out months ago.
"We knew from the very beginning of the season," Homeland executive producer and head writer Alex Gansa told USA TODAY on Monday afternoon, calling from Hawaii, where he has just started a pre-Season 4 vacation.
"That was one of the very first decisions we made in the story room. The entire story was plotted to lead up to that moment."
Gansa says it became clear when the writing team decided to send Brody to Tehran on a mission. "We knew he wouldn't come out of Iran alive."
The only thing that hadn't been decided? "We didn't know he would die in the manner in which he died," says Gansa.
That part evolved, as the story details unfolded. "We tossed around a bunch of ideas," he says, and ultimately this one made the most sense. "This is how they deal with people there. They hang them in the public square. It felt fitting."
Also fitting is the fact that the Brody death scenes, shot in Morocco, were the final ones on the schedule. "We shot the hanging sequence on the very last day off filming, and we shot it all night."
Gansa says, "There was a lot of emotional on the set. It was not only that were we saying goodbye to the character but to Damian Lewis." He adds, "I'm immeasurably sad to say goodbye to Damian, who did one of the most remarkable jobs bringing it to life. I'm not going to miss him. I'm going to mourn him."
And he confirms that Brody is definitely dead. He's not coming back. "There's nothing ambiguous about it. Brody's done."
Morena Baccarin, who plays Brody's wife Jessica, and Morgan Saylor, who plays daughter Dana, will not be series regulars for Season 4.
The Brody family members, says Gansa, have "served their purpose."
And if you're wondering about Mandy Patinkin and his Saul Berenson character, who walked out the CIA door in Sunday night's episode, Gansa says, "I think you can assume that Mandy and Saul will be back."
So what's ahead? Gansa isn't going to give up any spoilers. "No one has started to talk about Season 4 yet beyond the fact that Brody's dead and Carrie's on her way to a foreign posting. Season 4 looms in front of us."