When Faye Dunaway erroneously declared La La Land the best picture winner over Moonlight at Sunday night’s Academy Awards, the crew backstage was the first to realize her mistake.

“Oh my god! Oh my god! Oh my god!” a stage manager began whispering as the La La Land team took the stage to accept the night’s final award. “They read the wrong envelope.”

By the time Dunaway’s co-presenter, Warren Beatty, and the Moonlight team exited the stage, the world knew.

Nearly three hours after the debacle, Pricewaterhouse Coopers, the accounting firm that tallies the Oscar votes, issued an apology, which was sent out by the Academy.

“We sincerely apologize to Moonlight, La La Land, Warren Beatty, Faye Dunaway, and the Oscar viewers for the error that was made during the award announcement for best picture,” the announcement said. “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, and Jimmy Kimmel handled the situation.”

VIDEO: Dissecting What You Didn’t Hear About The Oscar Mishap

In the immediate moments after the error as he existed the stage, Beatty wasn’t pleased.

”Much respect, sir, much respect,” Moonlight director Barry Jenkins said to Beatty.

Stage manager Gary Natoli then approached Beatty. “Security would like the envelopes, Mr. Beatty,” Natoli said.

“I’m holding onto them,“ Beatty said. ”I’ll give them to Barry Jenkins at an appropriate moment.”

Meanwhile, Oscars producer Jennifer Todd conferred with a crew member: “But how did they both read the wrong thing?”

During the telecast, Beatty had returned to the stage to explain that he had mistakenly read from the second of two envelopes announcing Emma Stone’s best actress win, before handing the erroneous envelope over to Dunaway. Pricewaterhouse Coopers prints two announcements per category for security reasons. Stone said she still had hers in hand as the scene unfolded.

“I think everyone’s in a state of confusion still,” she told press backstage, according to People. “Excitement but confusion. I think everyone is just so excited for Moonlight. It’s such an incredible film.”

“I don’t know what just happened,” Kimmel said, as he exited the stage. “I should probably find out, because people are gonna be asking.”