The 2017 Oscars ended on a note of wild confusion as La La Land was falsely declared Best Picture instead of Moonlight. Here’s the Academy’s full apology.

In 89 years of the Oscars, nothing this bad has ever happened. Yes, in 1963 Sammy Davis Jr. was also given the wrong envelope when he announced the winner of Best Score, but this was a million times worse.

Warren Beatty and Faye Dunaway, having been handed the Best Actress envelope by mistake, declared La La Land the Best Picture winner, and the La La Land cast and crew had time to celebrate their win and pile onto the stage to start their thank-you speeches before they were abruptly interrupted and had to hand over the crown to the true winner, Moonlight.

Related: Here are the 2017 Oscars winners and losers

A moment that should have been a triumph for Moonlight, a low-budget independent film about a young black man which rightfully deserved this honor, was instead rushed and full of confusion. We just felt really bad for everyone involved, and have all tried to work out what really happened.

The Academy of Motion Picture Arts and Sciences has now issued a statement explaining and apologizing for the mix-up, which you can read in full below:

We deeply regret the mistakes that were made during the presentation of the Best Picture category during last night’s Oscar ceremony. We apologize to the entire cast and crew of La La Land and Moonlight whose experience was profoundly altered by this error. We salute the tremendous grace they displayed under the circumstances. To all involved — including our presenters Warren Beatty and Faye Dunaway, the filmmakers, and our fans watching worldwide — we apologize.

For the last 83 years, the Academy has entrusted PwC to handle the critical tabulation process, including the accurate delivery of results. PwC has taken full responsibility for the breaches of established protocols that took place during the ceremony. We have spent last night and today investigating the circumstances, and will determine what actions are appropriate going forward. We are unwaveringly committed to upholding the integrity of the Oscars and the Academy of Motion Picture Arts and Sciences.

PricewaterhouseCoopers released a statement Monday accepting full responsibility for the mix-up that led to Warren Beatty receiving the Best Actress envelope instead of Best Picture:

PwC takes full responsibility for the series of mistakes and breaches of established protocols during last night’s Oscars. PwC Partner Brian Cullinan mistakenly handed the back-up envelope for Actress in a Leading Role instead of the envelope for Best Picture to presenters Warren Beatty and Faye Dunaway. Once the error occurred, protocols for correcting it were not followed through quickly enough by Mr. Cullinan or his partner.

We are deeply sorry for the disappointment suffered by the cast and crew of “La La Land” and “Moonlight.” We sincerely apologize to Warren Beatty, Faye Dunaway, Jimmy Kimmel, ABC, and the Academy, none of whom was at fault for last night’s errors. We wish to extend our deepest gratitude to each of them for the graciousness they displayed during such a difficult moment.

For the past 83 years, the Academy has entrusted PwC with the integrity of the awards process during the ceremony, and last night we failed the Academy.

This is just a horrible situation all around, but huge congratulations to Moonlight for their much-deserved win, and respect to the La La Land crew for being so gracious in an impossible situation.