The 2017 Academy Awards were bound to be a memorable night. Justin Timberlake kicked off the show off right with an amazing performance of “Can't Stop This Feeling.” Mahershala Ali became the first Muslim actor to win an Oscar. But it wasn't until the end of the night, during the presentation of Best Picture, that it became clear that no one would ever forget the 2017 Oscars.

Check out what exactly happened and what has happened since then below.

Read more: Here’s the full list of 2017 Oscar winners

Warren Beaty and Faye Dunaway, stars of the 1967 Bonnie and Clyde, came to present the final award of the night. But when Beaty hesitated announcing the winner, most thought the actor was simply making a joke. Beaty read the card before checking the envelope for another, along with hesitating before showing the envelope to Dunaway. Dunaway laughs it off and announces the winner as La La Land.

This would have been La La Land's seventh Oscar win of the night if they won—but they hadn't. During the acceptance speech, it was clear something was amiss as the cast and crew of La La Land looked confused. Another envelope appeared and was opened. You can even read Emma Stone's lips saying “Oh my god” over and over as the acceptance speech still went on.

Producer Fred Berger ended his speech with, “We lost, by the way” creating even more confusion both for the live audience and millions watching the award show at home. Producer Jordan Horowitz followed immediately after to announce the true winner of the award.

“Sorry, no, there's a mistake,” said Horowitz trying to grasp control of the situation, “Moonlight, you guys won Best Picture.”

Horowitz extends his trophy trying to convince the confused cast and crew that “this was not a joke.” And for a moment, confusion ran rampant as the audience didn't know what was going on as they watched the cast and crew of La La Land try to give their trophies to the cast and crew of Moonlight. Horowitz than grabs the Best Picture card out of Beaty's hands to show the audience and the world that yes, Moonlight won Best Picture.

“This is very unfortunate what happened. Personally, I blame Steve Harvey for this,” joked host Jimmy Kimmel trying to ease the tension.

Harvey has since tweeted out to Warren Beaty with the message that he can help him “get through this.”

But the question that's been on everyone's mind since then is, how did this happen?

PricewaterhouseCoopers is an accounting firm that's been in charge of counting the Oscar ballots and making sure that the awards are distributed correctly for 83 years.

Brian Cullinan, a partner at PricewaterhouseCoopers, explained to Medium just how the Oscar process works during the show.

“The producers decide what the order of the awards will be. We each have a full set. I have all 24 envelopes in my briefcase; Martha has all 24 in hers. We stand on opposite sides of the stage, right off-screen, for the entire evening, and we each hand the respective envelope to the presenter. It doesn’t sound very complicated, but you have to make sure you’re giving the presenter the right envelope,” said Cullinan.

Beaty's hesitation comes from the fact that the card he had in his hand was for Best Actress in a Leading Role, which Emma Stone had won earlier in the evening. It appears that when Dunaway read the card, she skimmed past Stone's name, saw La La Land and announced the film as the winner.

PricewaterhouseCoopers has since made a statement apologizing for the error.

“We sincerely apologize to Moonlight, La La Land, Warren Beatty, Faye Dunaway, and Oscar viewers for the error that was made during the award announcement for best picture. The presenters had mistakenly been given the wrong category envelope and when discovered, was immediately corrected. We are currently investigating how this could have happened, and deeply regret that this occurred. 

“We appreciate the grace with which the nominees, the Academy, ABC, and Jimmy Kimmel handled the situation.”

Stone talked about the incident later on in the night, explaining how much she loves Moonlight and how it's “one of the greatest movies of all time.”

When Moonlight's cast and crew went up to receive their award, director Barry Jenkins gave credit to La La Land.

“The last 20 minutes of my life have been insane. It’s been otherworldy,” explained Jenkins, “It was so generous and gracious of them. My love to La La Land.”

So instead of remembering the powerful statement collectively made by the five directors nominated for Best Foreign Language Film, or Mahershala Ali becoming the first Muslim actor to win an Oscar, the world will remember the time La La Land won Best Picture for about three minutes.