The 89th Academy Awards will likely be remembered not for the night's big winners, but for a massive mistake, after presenter Faye Dunaway awarded "La La Land" the best picture Oscar that should have gone to "Moonlight" instead.

But it wasn't her fault.

The official accountant of the Oscars, Price Waterhouse Coopers, gave her the wrong envelope.

“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 firm 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.”

Here's how it went down.

RED CARPET LOOKS: SO HOT, OR SO NOT?

After some odd hemming and hawing, Beatty and Dunaway said "La La Land" had won best picture. The "La La Land" cast rushed the stage and started their acceptance speeches. But a couple of minutes into the happy scene, while they were all still onstage hugging one another and thanking family and friends, producer Jordan Horowitz stopped short and announced suddenly that "Moonlight" had in fact won.

He then held up the card that proved "Moonlight" was the winner in the best picture category. As the "Moonlight" cast and crew then confusedly took the stage, chaos ensued.

Beatty, who had presented the award with Dunaway, took responsibility for the gaffe, explaining that he and Dunaway had been given a card with the winner for best actress -- Emma Stone for "La La Land" -- and that Dunaway had then mistakenly read that as the winning film.

"I opened the envelope and it said Emma Stone, 'La La Land.' That's why I took such a long look at Faye, and at you," Beatty told the crowd amid the confusion on stage. "I wasn't trying to be funny."

Host Jimmy Kimmel took the microphone and tried to lighten the mood.

"I knew I would screw this up," he joked.

Later backstage, Stone said she still had the card from which her best actress win had been read, so it couldn't have been the one that they read from onstage.

“I also was holding my best actress in a leading role card [from the envelope] that entire time,”she said.

"I guess we made history tonight," she added after saying "Moonlight" deserved the win. "I don’t even know what to say. I was still on such a buzzy train backstage that I was on another planet already. This felt like another planet. I think it’s an incredible outcome but a very strange happening for Oscar history.”

The scene was reminiscent of Steve Harvey's mistake at the 2016 Miss Universe pageant when he read the name of the runner up as the winner.

JEN ANISTON TEARS UP AT OSCARS OVER BILL PAXTON'S DEATH

The telecast's bizarre ending overshadowed big wins by Casey Affleck and Emma Stone for best actor and best actress, respectively, as well as Damien Chazelle for best director for "La La Land.'

It also came after a night filled with jokes about President Donald Trump.

“The broadcast is being watched in more than 225 countries that now hate us,” Kimmel quipped.

The late night host said many people had asked him to speak up to say something to unite the country, and adopting a slightly serious note, Kimmel seemed to actually try to do just that.

“I’m not the man to unite this country, but if every person watching this show… took a minute to reach out to someone you disagree with and have a positive conversation, not as liberals or conservatives, but as Americans… we could really make America great again,” he said.

FOX NEWS’ FULL OSCAR COVERAGE

But after poking fun at longtime “rival” Matt Damon, Kimmel started taking some serious jabs at Trump.

“It’s so easy to reach out and heal. I want to say thank you to President Trump. I mean, remember last year when it seemed like the Oscars were racist? That’s gone thanks to him.”

Kimmel later took things one step further. He asked the crowd to stand for Meryl Streep, who memorably slammed Trump at the Golden Globes.

He then told the crowd, "Some of you get to come on this stage and make a speech that the President of the United States will tweet about in all caps during his 5 a.m. bowel movement."

After Kimmel's opening, Mahershala Ali took home the first award of the night for best supporting actor and thanked his teachers and professors as he teared up during his speech.

CLICK HERE FOR THE FULL LIST OF WINNERS

The Trump jokes from Kimmel continued throughout the show as he took the mic in between award announcements.

“Now it’s time for something that is very rare today, a president that believes in both arts and sciences,” Kimmel said before introducing Academy President Cheryl Boone Isaacs.

He also tweeted at the president at one point, writing #MerylSaysHi.

Meanwhile, Viola Davis won the award for best supporting actress, and, later, "The Salesman" won best foreign language film and a statement was read from director Asghar Farhadi, who did not attend the Oscars and stated he did so due to the "inhumane law that bans entry of immigrants to the U.S."

"La La Land," which had tied for a record with 14 nominations, didn't go home empty handed. In addition to Stone and Chazelle's trophies, it won the awards for best production design, best original score, best original song and best cinematography.

FOLLOW US ON FACEBOOK FOR MORE FOX ENTERTAINMENT NEWS.