The 89th annual Academy Awards went pretty smoothly… until everything went to hell in the final few minutes.

Fifty years after they co-starred in Bonnie and Clyde, Warren Beatty and Faye Dunaway emerged after midnight to present the final award of the night, Best Picture. Beatty looked seriously confused when he opened the envelope, declining to read the winner and seemingly leaving the audience of nominees in suspense. He could faintly be heard saying the words “Emma Stone.”

When he finally handed it to Dunaway, she read the name of the film everyone was expecting to take home the biggest award of the night after winning six of its record 14 nominations earlier in the evening: La La Land.

But after the producers of that film had already delivered their heartfelt acceptance speeches, it started to seem like something was wrong. A producer in a headset was wandering around on stage literally taking the Oscars out of the supposed winners’ hands.

Finally, producer Jordan Horowitz spoke up. “I’m sorry, there’s a mistake,” he said. “Moonlight, you guys won Best Picture.” He added, “This is not a joke. Moonlight has won Best Picture.” Horowitz took the card out of Beatty’s hand and held it up to the screen as proof. In the crowd, Moonlight director Barry Jenkins could be seen with his hand over his mouth in disbelief.

“This is very unfortunate, what happened,” host Jimmy Kimmel said, attempting some comic relief to cover up the awkwardness. “Personally, I blame Steve Harvey for this,” he added, referencing that time the host accidentally announced the wrong Miss Universe winner.

Eventually, Beatty explained what happened. “I opened the envelope and it said Emma Stone, La La Land,” he told the crowd. “That’s why I took such a long look at Faye and at you. I wasn’t trying to be funny.” Evidently, the Oscar producers handed him a duplicate Best Actress envelope a few minutes earlier (Stone explained to reporters backstage that she’d held on to her envelope during the whole ordeal). Instead of stopping the show and getting clarification, Beatty passed the buck to Dunaway who read the name of the film as the winner.

The words “Actress in a Leading Role” could be seen on the envelope Beatty he opened.

“Even in my dreams, this could not be true,” Jenkins said when the Oscar had been returned to him. “But to hell with dreams, I’m done with it, because this is true. Oh, my goodness. But I have to say—and it is true, it’s not fake—we’ve been on the road with these guys for so long and that was so great and so generous of them. My love to La La Land, my love to everybody. Man!”

In a year where Donald Trump came out of nowhere to beat Hillary Clinton, the Patriots came back to beat the Falcons in overtime at the Super Bowl, and Adele bested Beyoncé at the Grammy Awards, we should have expected something as unexpected as this to happen at the Oscars. But this type of high stakes flub was unprecedented.

Ultimately, the La La Land producers had their dreams dashed and the Moonlight crew had their big moment practically stolen out from under them. But no one can take away the very real news that a tiny movie about a gay, black man growing up in Miami that cost just $1.5 million to make won the film world’s highest honor.