Los Angeles (CNN) It's an Oscar moment that will go down in history.
Not only did "Moonlight" pull out a surprise win over "La La Land" for best picture, but their big moment came after presenters Warren Beatty and Faye Dunaway accidentally announced the wrong winner.
They initially announced "La La Land" as best picture.
The cast and producers from "La La Land" had already taken the stage and began their acceptance speeches when they learned "Moonlight was the actual winner.
Host Jimmy Kimmel took the stage to explain the mistake as the crew from "La La Land" exited and the news sunk in for the "Moonlight" cast and producers.
"Guys, this is very unfortunate what happened," Kimmel said. "I would love to see you get an Oscar anyway. Why don't we just give out a whole bunch of them?"
Beatty then took the mic to explain "La La Land" was mistakenly announced because he and Dunaway received an envelope that had Emma Stone's name on the card.
"That's why I took such a long look at Faye....I wasn't trying to be funny," Beatty explained.
Backstage, Stone claimed she had the card that announced her as best actress win "the entire time."
"I don't mean to start stuff," she said. "But whatever story that was ... I had that card. I'm not sure what happened."
Stone added that she was "so excited" for "Moonlight."
"I think it's one of the best films of all time," she said.
"Moonlight" director Barry Jenkins, already a winner in the best adapted screenplay category, was the first to speak after explanations were made.
"Very clearly, even in my dreams this could not be true," he said.
Jenkins thanked the cast and producers from "La La Land" for being "gracious" and "generous."
"My love to 'La La Land,'" he said.
"La La Land" had been an early favorite to win in the category, but the shift in tides of award season in recent weeks had led some to predict "Moonlight" could pull an upset.
The coming-of-age drama took home two other awards, including one for Mahershala Ali.
Kimmel closed out the night saying, "I blame myself for this... I knew I would screw this show up, I really did."
PricewaterhouseCoopers, the accountancy firm that is responsible for winners' envelopes, issued an apology for the mistake and said it was "immediately corrected."
"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," it said in a statement.
"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."