The following post contains SPOILERS for Groundhog Day. Please tell me you have seen Groundhog Day before. Why would you even click on this headline if you hadn’t?

It’s one of the greatest movie endings in history. After enduring countless repetitions of February 2, Phil Connors finally breaks free of his time loop. Just as there was no explanation how he got trapped in the first place, there’s no explanation how he escapes, although February 3 finally arrives after Phil spends a last Groundhog Day helping the residents of Punxsutawney, Pennsylvania, and sweetly romancing his producer Rita. Phil wakes up on February 3 with Rita in his arms. They live happily ever after.

That’s the version we’ve watched over and over againThat is not the version that writer Danny Rubin originally scripted, though. Rubin, who created the concept for Groundhog Day, and later co-wrote its screenplay with director Harold Ramis, originally structured the film very differently.

Instead of opening as Ramis’ finished film does with Phil (Bill Murray) giving a weather report in the studios of WPHB in Pitssburgh, Rubin’s original draft began with Phil waking up in the bed and breakfast in Punxsutawney on February 2. Without explanation, he seems to know what everyone will say and do before they say it. Only later, via voiceover, does Phil begin to explain why he seems to be able to predict the future — because he has been trapped reliving February 2 for an eternity.

Rubin loved this structure, but Ramis eventually decided to change it; in his telling, he and his production team decided that the audience would feel cheated if they didn’t get to see how Phil first reacted to discovering his predicament. This is all pretty well-known; Ramis talked about it on his commentary track for the film, and mentioned it in numerous interviews. What I never realized until today is that Rubin’s original concept also included a twist ending that would have turned Phil and Rita’s happy ending on its head as well.

Rubin described this initial ending at a screening of the film back in 2012 that is available on YouTube. Here is how he describes it:

At the very end, he wakes up with Rita just like this. And then a second later, Rita is out of there. She can’t wait to leave. And it turns out that she’s been reliving February 3 over and over again. But the thing is it switches over to her story, at the very end as we’re realizing she’s been repeating that day over and over again, there’s a Rita voiceover. So the movie actually switches point of view from his voiceover to hers.

Rubin notes that when he wrote his first draft of Groundhog Day he had never seen a movie with multiple voiceovers from multiple points of view — only to watch as Martin Scorsese’s Goodfellas used that trick a few years later.

As a punchline and a surprise, it’s a brilliant one. But without the voiceover in the beginning, or the conceit of beginning in the middle of Phil’s story, it probably wouldn’t have worked the way Rubin wanted. Given that Rita begins repeating February 3 the night after she sleeps with Phil, this ending would also heavily imply that the whole time-looping thing is some kind of sexually-transmitted disease, kind of like the monster in It Follows. Which is kind of interesting! But it’s definitely not in keeping with the rest of Groundhog Day. (Someone’s going to pitch a Groundhog Day-style horror movie with an It Follows-style monster now, huh?)

Ramis’ instincts were to make Groundhog Day more accessible, and the ending he gave the movie is perfect. Rubin’s twist is like the day where Phil convinces Rita that he is repeating February 2 and she spends it with him as an “experiment”; it isn’t bad, it’s just not as good as it could be. The other thought I had hearing Rubin’s twist — and I genuinely hate myself for having it — is that this idea would have made a perfect sequel. Thank goodness that never happened.

Groundhog Day is currently streaming on Netflix. Here’s Rubin’s full Q&A, which has a lot of interesting tidbits about the production and writing process:

Gallery — The Best Movies of 1990: