Spoiler warning: Do not read on unless you’ve seen “The Leftovers” episode 209, titled “Ten Thirteen.”

As “The Leftovers” heads into its home stretch, it unleashed an amazing twist at the end of its ninth episode — one that was inspired by a classic ’70s film.

Below, co-creator and executive producer Damon Lindelof discusses how “The Leftovers” pulled off that shocker, what the HBO drama did differently in its excellent second season and how the show is and is not like “Lost.” He also discusses TV’s “fakeout death” trend and season two’s exceptional eighth episode, “International Assassin.”

Here is Part 2 of this interview, and Part 3 of Variety’s conversation with Lindelof, which covers the show’s second season finale, is here.

Variety: Obviously, the big takeaway of episode nine is that Evie is alive, the girls are alive and they’re in the Guilty Remnant. Was this a long-planned thing? Can you talk about how that came about?

Damon Lindelof: I don’t want to totally demystify the writing process of the episode, but with that particular reveal, there was a trajectory of ideas that fell [into place] very, very early on as we designed the season. One of the things that I think that the first season certainly lacked was a backbone of, “This is the story of the season.” It was a little bit more about watching the condition of these people’s lives, and I was really interested in exploring that territory, but it lent itself more to a “day in the life” form of storytelling, versus [having] a spine to kind of build this on. When you watch a season of “Justified” or “Breaking Bad,” you basically go, “Oh, this is the season where Jesse and Walt are working in the Superlab and this is what they need to overcome.” There was a real shape to it.

And so very early on, we knew that we were going to move the show to Miracle and I was very passionate about the idea of starting the storytelling through the point of view of the Murphys and then bringing the Garveys into that world, et cetera. And then [executive producer] Tom Spezialy, who came on this year, when I pitched him the Miracle idea, he asked me if I had seen “Picnic at Hanging Rock,” which is a Peter Weir movie.

Great film.

An amazing movie, and I was like, “Yeah, of course I’ve seen it.” He said, “Have you seen it recently? Because I thought about that movie all the time when I watched the first season of your show.” So I watched it again. The first thing I had in my head was that “Picnic at Hanging Rock” was based on a true story [which is not the case]. But the reason that I had that in my head is that the movie basically opens with a title card that says, “In 1900, these girls disappeared and they were never found.” And then the movie starts. So I’m like, “That has to be a true story, because why would a title card tell me that they were never found?” But what was particularly amazing about that form of storytelling is that you’re now about to watch them disappear and the movie just told you you’re never going to find out where they went. How can you make this movie work knowing that it’s going to withhold the answer from you? It’s going to explore the question and people are going to be blamed but you know that those are going to be red herrings — I had completely and totally forgotten about this.

So we emerged from the “Hanging Rock” experience with the idea that these girls are going to disappear. Evie Murphy is going to be one of them. Now the question becomes, “Is the audience going to let us get away with what Peter Weir got away with, especially when we’ve already told them we’re never going to tell them what happened with the Departure? Now we’re just rubbing salt in their wounds [with another disappearance]. Is it viable or acceptable to just have these girls depart? Is that going to be a satisfying answer?”

And we have to answer for ourselves as writers, you know. We know [there were] three possibilities. Possibility number one, they departed. They went where the two percent went, where everybody else went and it’s [an event with a] supernatural, inexplicable origin. Number two, foul play befell them. Somebody came and attacked them, dragged them off into the woods and they’re buried, they’re dead or kidnapped somewhere. And possibility number three is they staged it. These girls basically manufactured their own disappearance.

Number three was far and away the most appealing choice for us. It felt like it wasn’t even a choice, because we wanted to tell a story about Miracle, and we wanted to talk about what would it be like to live in a town that it is deemed holy and it attracts all these people who are looking for salvation or relief or answers. You just live there and you see these people come in with wristbands every day searching and searching and searching. But you don’t know what it is that spared your town in the first place. And let’s say your town is just as f—ed up as everywhere else is. So it’s exceptional for the fact that nobody disappeared from it, but when you look around you’re kind of like “Why? I don’t know why this is. I don’t know what’s so special about where I live.” What kind of emotional effect would that have on you?

We were having all those conversations very, very early on and we decided the girls were really angry about the exceptionalism. They sing the Miracle anthem but they sing it snidely and snarkily and with some degree of teenage rebellion. We’re like, “Yeah, they faked it.” And obviously this is a horrible thing to do — it goes well beyond a teenage prank, to put your parents through this. Not to mention you’d need a significant degree of resources in order to pull it off. Where would you go in a media[-saturated] culture? How could you even disappear? How big of a thing would this be? When we started kind of kicking the tires [of this concept, an idea came up.] What if they staged it for a greater cause? A pseudo-religious cause? Jackie Hoyt, one of the writer/producers, suggested they joined the Guilty Remnant. As soon as she said it, we were like, “Of course they did.”

There was a bit of fear and trepidation on our part in terms of pulling that lever down because I think that if there’s one sort of unanimous gripe about the first season of the show, it’s the Guilty Remnant. And if there’s one sort of unanimous “Hallelujah!” about the second season, it’s “At least the GR is not in the show that much anymore!” We had them in episode three, but Laurie is running them over. “That’s the way that I want to see the GR!” So [the girls’ disappearance is a way of saying that] this thing that was the Big Bad of season one is still the Big Bad of the show. That coincided with this larger idea that Jill articulates in the fourth episode, which is, wherever you go there you are.

So the GR was [still around] but they can’t be in Miracle. Our story has been set in Miracle, and what if the juice that’s been running under this entire season is that the GR is basically figuring out how they’re going to f— up Miracle too — how they’re going to make Miracle remember. There’s a high degree of risk in terms of pulling that off. Obviously we kind of needed to keep Meg on the bench, because if we were threading that idea all throughout the season, I think that the audience probably would have been way ahead of us.

We’re in a media culture where the audience is so sophisticated and they can crowdsource and Reddit this information — if they get a twist, you know, like the Edward James Olmos [twist] on “Dexter” or what happened recently on “The Walking Dead,” the audience basically crowdsourced exactly how [that twist could have happened] within hours of it airing. By the time it airs a month later, the audience just goes “Duh!” That’s not the storytellers’ fault. It’s just the sophistication [of the audience’s ability] to figure things out. It’s like, we’re up against this incredible creative algorithm.

So if “The Leftovers” is going to have a twist, if we have any chance at surprising people at all, we really have to hide it but we have to make it fair. There are things in the premiere like the girls driving in silence. You see them goofing around and listening to music and kind of busting the balls of the guy who’s gathering water. And then they get in their car and they’re driving silently and stone-faced. And there are little moments, like when they’re singing the Miracle song with some sense of cynicism, and the oddness of the knock-knock joke, and obviously the gift that Evie gives to her father. We’re going to revisit that in the finale.

We had to set it up in the premiere and then just let it go and just hope that nobody figured it out, because if one person went on Twitter and said. “Those girls driving in the car without speaking reminded me of something,” the whole second season of the show [goes down]. By the time we revealed it at the end of episode nine, there would have been a big collective “Duh,” versus hopefully a collective gasp. My hope is that when the door of that Airstream opens up at the end of episode nine, the audience goes, “The writers knew. Of course they knew. It was all there.”

At the same time, for me it’s most exciting when I’m feeling like something could be a complete and utter disaster. I felt that way about episodes seven and eight. The whole idea of the fake-out death, as it were, is this horrible trope in TV now. How could we do that story and let the audience know that we knew we were doing that story? But then, you know, episode eight being what it was played into some of one of the larger criticisms of the kind of storytelling that I’m engaged by — although I loved that episode and Justin Theroux’s performance in it and particularly Ann’s performance in it and Craig Zobel just directed the s–t out of it. But it was so out there — you just never know what’s going to happen.

So I am feeling that the final minute of episode nine — people are either going to go, “That was amazing, I didn’t see that coming and I loved it!” Or they’re going to go, “I didn’t see that coming and they didn’t earn it.” Or they’re going to go, “I f—ing hate the Guilty Remnant and now I’m going to have to deal with that again.” That said, I’m really happy that we made the storytelling choice, and I think it’s a really satisfying answer to a mystery that probably a fair amount of audience felt like we might not answer at all.

For me, the reveal worked, partly because I didn’t need it. Does that make any sense?

That makes perfect sense.

I mean, this world is interesting to me and your show is about asking questions. This is not a show that has ever told me as a viewer, “Every week we give you another piece of the mythology and you have to put the puzzle together.” You’ve made that very clear from day one that it is not that kind of puzzle-solving show. Whatever other issues I’ve had with the show, there was total clarity about the idea that it’s more about questions than answers. I’ve never felt misled.

Well, thank you. And that’s why, you know, among other reasons, emotional reasons, that’s why Patti’s final soliloquy is about “Jeopardy.” The reason it’s about “Jeopardy” is because you have to give your answer in the form of a question.

I had issues with the Guilty Remnant in season one, but this season I’ve realized, I don’t mind the GR as a backdrop against which an interesting character operates or comes into my orbit. That’s fine. But, “Let’s hang with the Guilty Remnant and watch them write on pads of paper” — that didn’t do it for me.

You’re not wrong. Nope, you’re right. Hopefully I feel like we presented the Guilty Remnant in a more compelling way through Meg’s perspective, because she questions them. In fact, she challenges the parts of the Guilty Remnant. “I don’t want to write on this pad of paper. Stop writing. Let’s f–ing talk.” And that’s good, because that’s what religion is. I mean that’s why there’s a broad [array of faiths]. Not every Christian is a Catholic. There have to be people inside those religions questioning and challenging and offering new doctrine.

So this season I felt built on a lot of what worked about season one. You had episodes that just focused on one character or a few characters and what they’re going through at that moment. You had the spine of the girls’ disappearance. And then at times, you added yet another sort of familiar piece — in episode eight, you had the overlay of international assassin movies. That hour was like “Taken,” but starring existential doubt.

Right.

I was re-reading an interview you gave at the start of of the season, and you said something about season one, something along the lines of, “People didn’t like too much uncertainty.” But I don’t know if I agree with that. I think this season was so good because I felt like I didn’t know what the characters were going to do and things could and did change on a dime. But there were these frameworks that allowed me to think there was something familiar about how the show was going to operate. Was that kind of the goal?

One of the primary emotional engines that’s basically driving the world of “The Leftovers” is this highly anxious state of of feeling like, “I don’t know what this huge thing that happened was and it could happen again at any moment. But I guess I just kind of have to live my life.” I remember watching this documentary about the Blitz and what it was like to live in London during that time. It was amazing, the footage of people just putting on their clothes and going about their day and going to work and school. And then these air-raid sirens would go off and they would very kind of mellowly go to the bomb shelters, and then they’d get the f–k bombed out of them for two hours. They would come out and if their institution of wherever they worked was still standing they would just go to work. It was just amazing to me, because I knew that internally what was happening with it was that they were freaking the f–k out. That’s what your body does. We know too much about PTSD — if you’re in a state where people are constantly trying to kill you, that is going to have an effect on you. How do we kind of dramatize that anxiety?

I do think it took the form of depression perhaps too much in the first season. Now it feels a lot more like what I want it to be, which is the idea of, how is everyone’s behavior manifesting itself in an unpredictable way when they’re doing something as opposed to doing nothing? Even if “something” is throwing a rock at somebody else’s house or trying to exorcise the demon. The characters just end up being much more active. As far as the audience goes, the audience just wants to feel like the characters are doing something, are working towards something. They want something. They want to feel better.

The Garveys are the family who we know, that we care about. They sit down and they basically articulate this idea very early in the season. They say, “Let’s clear the decks. Let’s tell our secrets. Let’s feel better. Let’s get out of here.” That’s what that whole episode was about. And so I think that the show is telling the audience we don’t want to be in that sad place. The characters don’t want to be in that sad place, and I think that that was a huge positive shift for the show, to just catalyze that action.

And then there’s just storytelling moves that you do where [you reassure the audience]. For example, if episode seven had ended with Kevin and Virgil just lying there dead on the floor of the cabin and then episode eight had started as it began, [that wouldn’t have been ideal]. We had to let the audience know Michael is dragging Kevin out of this room — there is some kind of plan in motion. If you can extrapolate that Michael is going to go bury Kevin in the ground because — you know, Virgil has birds and we just did a whole thing in episode six where he buries birds, etc. Why would we hide that? We want you to know that Kevin has not exited the mortal realm. We know that you’re a sophisticated audience. We’re going to give you some hints, because why keep that secret? There’s no reason to be mysterious just for mysterious’ sake.

That’s the thing that I’m trying to learn, because it’s completely and totally situational. When we did “Star Trek Into Darkness” for example, we decided that we weren’t going to tell people that Benedict Cumberbatch was playing Khan. And that was a mistake, because the audience was like, “We know he’s playing Khan.” That was why it was a mistake. But J.J. [Abrams] is telling us nothing about the new “Star Wars” movie and we love it. I’ve not come across a single person who’s like, “I wish I knew a little bit more.” We are like, “Thank God he’s protecting us from all the things that will be revealed in the movie theater.”

But let me just circle back to “Picnic at Hanging Rock” — you go into the story knowing the girls aren’t found. Do you know what I mean? Sometimes it’s okay to know. It would not have hindered my enjoyment to know that Benedict Cumberbatch was playing Khan. That would have made it more awesome — the anticipation can be part of the enjoyment.

Let me ask you — if you were getting popcorn when “Hanging Rock” starts and you came into the theater after that [explanatory] card went up, you’re watching an entirely different movie than everyone else in the theater.

That’s true, but if it’s a good enough movie, I don’t give a s–t if I don’t find out where they went.

Probably true, but you should do some reading on “Hanging Rock” in terms of what the audience reaction was. People would stand up and scream at the screen. Apparently in Cannes, people booed, even having seen the title card. And that was in the ’70s when you were allowed to do that, when you were allowed to not give definitive endings.

If a story is engaging me with its atmosphere, with the emotional content, with the journey of the characters, with who they are and the choices they’re making and there is — as was the case with “The Leftovers” this season — kind of an activated place to go or interesting questions being explored, I’m all in. You can go to those extreme places because I know that there’s a shape to it, there are compelling ideas and people and I trust the story.

Well, I appreciate that. By the way, we live in a culture that wants to assign auteurship to television shows, but the writing staff on the second season of the show was just consistently excellent. I really feel like this season is a byproduct of those individuals — and this is not to take anything away from anybody who worked on the first season. But the discussions that we had in the room [laid the groundwork for season two].

Just addressing the tropes of the international-assassin genre [in episode eight]. Once we decided that’s what we were going to do, the tire kicking that occurred [was extensive]. How are we going to earn this — from the bronze plaque to what would happen if Kevin put on a different outfit? Is there something emotional in him that draws him to these [assassin] movies? What’s the comedy line that can’t be crossed? The “Godfather” joke is good, other jokes were not good. When do we distort and bend the rules of reality? How do we make the shift from Senator Patti Levin to Rhonda Gennaro, who’s claiming to be her double? That episode was generated out of the most intense two weeks in the writers’ room of really incredibly talented people field-testing, kicking every idea back and forth before Nick [Cuse] and I went off and wrote it. Every episode, I think we’ve handled that way. There’s a real sense of scrutiny and embracing stuff and taking risks, but also earning risks.

“The Leftovers” airs Sundays at 9 p.m. on HBO.

This interview has been edited and condensed.