Warning: This article contains spoilers about the series finale of The Leftovers.

HBO's The Leftovers aired its last episode on Sunday night in the US – but it could have ended very differently.

Co-creators Damon Lindelof and Tom Perrotta, as well as the other writers on the show, spent more than two weeks trying to figure out the last scene, and in the aftermath of the finale, Vulture has offered a deep dive into what went on behind the scenes and the number of different ways the conclusion could have gone.

Here's what viewers saw: in the future, an older Nora (Carrie Coon) comes face to face with an older Kevin (Justin Theroux) for the first time since their huge hotel break-up in Melbourne.

She reveals what happened to her over a cup of tea, before they reconcile ("I believe you." "You do?" *sobs*).

HBO

Nora's story? That when she went through the LADR machine, she was transported to a mirror world where it was the other 98% who disappeared instead. She found her departed family in this world, but decided to go back, coming to terms that she had no place in this reality.

The notable thing about the way this scene plays out is that it entirely focuses on actress Carrie Coon, who does an amazing job telling the story. The episode does not cut to any flashbacks. It is open to interpretation as to whether Nora's story is true or not.

HBO

Lindelof actually pitched early on that they should show the mirror world – which received support, except from book author Perrotta. As Vulture writes:

"He made it so f**king compelling," says Perrotta, "and everybody in the room is going, 'Yeah!' And I'm sitting there going, 'No!' " Lindelof, comparing his writers' room to 12 Angry Men, says that "Perrotta became Juror No. 8" — the lone dissenter who brings the room around. Perrotta gave a version of his Leftovers stump speech: "It was always just a given for me that there is this mystery, the same mystery of where do we go when we die, and the idea that there's one authoritative answer seems palpably ridiculous to me."

If that had happened and we saw flashbacks, it would have made Nora's story definitive and fact.

HBO

Various extremely early pitches of what the final episode could look like were also shared.

In one alternate ending, Nora gets vapourised by the LADR machine. Kevin follows and goes through too, and nobody ever finds out what happened to them.

In another, Kevin would use his afterlife world to find out if Nora has died.

And a third one would have seen Kevin not go after Nora but instead die as a martyr, with biblical parallels.

HBO

At one point, the person Nora was talking to in that final scene wasn't even Kevin. As Lindelof tells The Hollywood Reporter, the writers considered a "grown-up version of Lily who would be maybe a 19 or 20-year-old young woman" or Erika Murphy.

Fortunately, after plenty of debate, the writers managed to stick the landing with the ending, resulting in one of the best series finales in recent years.

Want up-to-the-minute entertainment news and features? Just hit 'Like' on our Digital Spy Facebook page and 'Follow' on our @digitalspy Twitter account and you're all set.

This content is created and maintained by a third party, and imported onto this page to help users provide their email addresses. You may be able to find more information about this and similar content at piano.io