The 89th annual Academy Awards had already gone long, running well after midnight, but the prevailing headlines and narrative changed drastically during its closing minutes. And dramatically so, like the New England Patriots finishing off a stunning comeback win over the Atlanta Falcons in Super Bowl LI.

The story of the 2017 Oscars, however, changed suddenly, providing a surreal moment that left the audience at the Kodak Theater and millions watching on television wondering if they had been pranked. And those tasked with writing Oscars recaps quickly had something substantial to write about, rather than rehash a ceremony with few highlights or surprises.

In a stunning sequence of events, Moonlight was awarded the Best Picture Academy Award after presenter Faye Dunaway had announced La La Land as the winner, reading it off the card co-presenter Warren Beatty handed to her. As Oscars organizers and stage managers, along with the producers of La La land and Moonlight, and host Jimmy Kimmel were trying to make sense of the situation, the immediate question became how such an embarrassing gaffe could occur.

Beatty explained that he was given the wrong card, one which read “Emma Stone, La La Land.” At the time, Beatty seemed as if he was milking the moment, goofing around to add suspense. But it’s now clear that he was wondering what had gone wrong.

In retrospect, the best thing for Beatty to do would have been to say he had the wrong card, call over a stage manager or walk off stage to fix the mistake. Instead, he apparently thought the show must go on or tried to salvage the moment, but added to the confusion by looking at Dunaway and handing her the card, like “You read it.”

Whether Dunaway saw Stone’s name or not is unknown, but she saw the film title on the card and announced La La Land as the Best Picture winner. Joy ensued, followed by chaos.

La La Land producer Jordan Horowitz, who informed the audience of the mistake and announced that Moonlight had really won Best Picture, explained his version of events to reporters afterwards, including Gregg Kilday of The Hollywood Reporter.

“Guys in headsets starting buzzing around. They took the envelope I had. It said Emma Stone in La La Land on it. It was clear there was something wrong. They started looking for the best picture envelope. Nobody knew where it was. Then it appeared. They opened it next to me and it said Moonlight, and so I grabbed it. I had to fix the situation.”

Kilday went on to explain how the process with handing cards to awards presenters typically works.

In the normal course of events, the accountants from PricewaterhouseCoopers create two complete sets of actual winners’ envelopes. During the ceremony, two accountants stand on opposite sides of the stage throughout the ceremony, alternating between each other in the handing out of envelopes, depending on which side of the stage the presenters enter from.

There was no immediate explanation why Beatty was handed the wrong envelope. And the Academy didn’t respond to requests for comments.

The shame of it all is that the envelope gaffe ends up taking away from what should have been a triumphant evening for both La La Land and Moonlight.

La La Land still won six Oscars, including Emma Stone winning Best Actress (two envelopes with that result were opened) and a Best Director award for Damien Chazelle (who, at 32, became the youngest filmmaker to win the honor). Yet people will now not only remember that it didn’t win Best Picture, but that the award was taken away in probably the most embarrassing situation imaginable. Producer Fred Berger saying “We lost, by the way” after thanking his family and Chazelle was awkwardly confusing.

Yet while Moonlight did win Best Picture, the top award any film strives to earn, director Barry Jenkins, producers and the cast were deprived of the moment of which they all surely dreamed. Hearing the title read by the presenters, getting to walk up to the stage while the music plays, receiving congratulations from your peers nearby, and basking in the moment. Yes, Jenkins got to make an acceptance speech, producers were handed their Oscars statues, and everyone involved got to relish the moment.

Moonlight had also earned two Oscars earlier in the evening, with Mahershala Ali winning Best Supporting Actor (becoming the first Muslim actor to win an Oscar) and Barry Jenkins and Tarell Alvin McCraney earning Best Adapted Screenplay honors. But never has an Academy Awards win so directly seemed to come at someone else’s expense like it did here. Maybe it will ultimately be more memorable this way. This is certainly an outcome that Hollywood and Oscars fans will never forget.

Other highlights of the 2017 Oscars

** Prior to the Best Picture fiasco, the 2017 Oscars was a perfectly fine show, though one typically running overly long. Kimmel used that to make one of several jokes at the expense of his comedic arch-nemesis Matt Damon, a frequent target of jabs all night.

** The theme of the evening was “inspiration,” the sort of self-important stuff that the Oscars love, with actors talking about those who inspired them. Charlize Theron praised Shirley MacLaine’s performance in The Apartment and Javier Bardem paid tribute to Meryl Streep, while Kimmel tipped his hat to Damon’s work in We Bought a Zoo.

** But the real theme of the evening was addressing President Trump and the effect his administration is having on the culture and the world at-large. However, the politics weren’t overt. The prevailing sentiment was fighting against division and trying to listen to opposing views. No one got on a soapbox, with one exception that was absolutely necessary.

Politics simply could not be avoided when Iranian film The Salesman won the Oscar for Best Foreign Picture. Director Asghar Farhadi (who previously won the award in 2002 for A Separation) chose not to attend in protest of Trump’s executive travel ban on citizens from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

Anousheh Ansari, an Iranian-American engineer and astronaut, accepted the award on his behalf, and read a speech by Farhadi which denounced the law as “inhumane.”

** Kimmel’s most direct Trump joke involved directly tweeting the president, knowing that he could very well respond to any criticisms of him, as he did to Meryl Streep after her Golden Globes speech. The first tweet to Trump got 248,000 retweets and nearly 500,000 likes. The second didn’t get as much play, but maybe that’s because Kimmel didn’t put a period before @realDonaldTrump so everyone could see it. Unfortunately, the president didn’t respond. But what are the chances that another host tries again during the next awards season?

** If not for the Best Picture gaffe, the post-show talk might be focused on Kimmel leading a tour bus group which believed it was seeing an Oscars gown display into the Academy Awards ceremony. The procession was led by a man named Gary from Chicago, who seemed more interested in filming on his phone than acknowledging the celebrities in front of him.

But Kimmel introduced Gary to several nominees in the front row, including Ryan Gosling, who generously gave the tourist some candy that had been dropped from the ceiling earlier in the show.

Gary’s fiancé, Vicky, seemed a bit more star-struck by the ridiculously handsome and charming Gosling. Or maybe she was wondering why she didn’t get any candy.

As it turns out, almost everyone at the Oscars Sunday night walked out of the Kodak Theater with a similar expression to the one Vicky had on her face. The evening became truly surreal, giving us a moment we’ll be talking about for days, weeks, months and years to come. The bar has already been set for next year. Just get the envelopes right, PricewaterhouseCoopers.

About Ian Casselberry

Ian is a writer, editor, and podcaster. You can find his work at Awful Announcing and The Comeback. He's written for Sports Illustrated, Yahoo Sports, MLive, Bleacher Report, and SB Nation.