Shock and chaos spread when producers of "La La Land" were stopped in the middle of their acceptance speeches to be informed that actor, and the announcer of the award, Warren Beatty had incorrectly read "La La Land" as the winner.
PHOTOS: The winners of the 2017 Oscars
A blushing Beatty immediately explained how the mix-up occurred.
"I wasn't trying to be funny," he said, saying he had seen the name Emma Stone from "La La Land" when he opened his envelope.
Following the show, PricewaterhouseCoopers issued a statement apologizing for the mishap.
"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."
Host Jimmy Kimmel confirmed that "Moonlight" had indeed won, showing the inside of the envelope as proof. He joked, "I knew I would screw this up."
"La La Land" producer Jordan Horowitz graciously passed his statue to the "Moonlight" producers and cast.
"I feel compassion for those guys for handing the award over, you know. We spent so much time together, you know, you almost want it to be like middle school where everybody gets a trophy...so, in the moment, I was like, 'Yeah, of course,' you know, I was glad that they got to celebrate," said "Moonlight" director Barry Jenkins at the Governors Ball after party.
Stone, after the awards show, shared she had her win card the entire time, leading to more confusion about how the mix-up occurred.
"I also was holding my best actress in a leading role card that entire time. So, whatever story, I don't mean to start stuff but whatever story that was, I had that card, so I'm not sure what happened...," she shared.
"Manchester by the Sea's" Casey Affleck was this year's best actor.
"If I said I wish I had something meaningful to say, that was sort of my inside voice coming out...I didn't thank my children, which is probably something I'll never, ever live down," he said in the press room following the awards ceremony.
The entertainment-packed ceremony showed little love for Oscar-favorite "La La Land" until mid-way into the show. The film won a total of six Oscars, including original score, original song, cinematography and production design. The film's director, Chazelle, is the youngest best director winner at just 32 years old. The biggest Oscar winner for the film: Stone for best actress.
Singer Justin Timberlake kicked off the 89th annual Academy Awards with a politics-free performance of his Oscar-nominated song "Can't Stop the Feeling."
Kimmel didn't stray entirely from politics. He took a shot at President Donald Trump, saying his policies had made the Oscars seem "less racist." The "OscarsSoWhite" crisis of the last two years was put to an end this year by a heavily diverse slate of nominees, thanks to films like "Moonlight," "Fences" and "Hidden Figures." A record six black actors were nominated.
He also struck an irreverent but sarcastic tone, singling out best actress nominee Meryl Streep, whom Trump previously called "overrated" after her fiery Golden Globes speech last month. Listing some of her credits, Kimmel said she "phoned it in for over 50 films." He also led a standing ovation for the actress before telling her: "Nice dress, by the way. Is that an Ivanka?"
The host then said Trump was sure to tweet about the Oscars at 5 a.m. "during his bowel movements."
The night's first winner was Mahershala Ali for his performance in "Moonlight," making him the first Muslim actor to win a gold statuette. He thanked his wife for "being such a soldier" while being pregnant during the making of the film. The couple welcomed their daughter four days ago.
The favorite in her category, Viola Davis won the Oscar for best supporting actress for her work as a mother determined to hold her family together in the best picture-nominated film "Fences." In tears, the actress praised co-star Denzel Washington and her parents.
Another person to get a standing ovation at the Oscars was former NASA mathematician Katherine Johnson, who was portrayed in the film "Hidden Figures" by Taraji P. Henson. The 98-year-old Johnson was brought out in a wheelchair during the ceremony and thanked the audience for their warm welcome.
Ezra Edelman's "O.J.: Made in America" took best documentary, making it the longest Oscar winner ever, as it was 467 minutes long. The producer dedicated the statuette to victims Nicole Brown Simpson and Ronald Goldman, as well as victims of police violence and police brutality.
Another stand-out winner of the night was 59-year-old sound re-recording engineer Kevin O'Connell. After 21 Oscar nominations, he won an Academy Award for his sound mixing on "Hacksaw Ridge."
Just like at the movies, stars at this year's Academy Awards were munching on candy and popcorn as they watched the show unfold after bags filled with treats came floating down from the ceiling and into the audience's hands.
Another memorable moment? Unsuspecting tourists aboard a Hollywood tour bus were treated to the surprise of their lives with a trip to the 89th Oscars ceremony. They got to meet and take photos with A-list celebrities like Ali and Washington.
See who wore what on the red carpet at the 89th annual Academy Awards:
The Associated Press contributed to this report.