Moonlight ended up winning the top prize at Sunday night’s 89th Academy Awards, the Oscar for Best Picture of 2016 after the musical La La Land, believed to be a top contender alongside Moonlight for the award, was accidentally announced as the winner.

Legendary actors Warren Beatty and Faye Dunaway presented the Best Picture award — the final award of the night — and after Beatty seemed to struggle and take a while to open the envelope and read the winning film’s name, Dunaway seemed to get frustrated and exclaimed La La Land. 

After the crowd cheered and the musical film’s cast and crew of the film got up onto the stage and the producers began taking turns giving acceptance speeches, one of La La Land’s producers quickly took the microphone and announced the mistake, saying, “This is not a joke, Moonlight has actually won Best Picture, and we will graciously hand this award over to them.”

When ceremony host Jimmy Kimmel chided Beatty for his flub, the legendary actor explained that he was confused upon opening the envelope because the card said, “Emma StoneLa La Land'” (the envelope containing the previous award for Best Actress, which Stone won). “I wasn’t trying to be funny,” said Beatty to explain his puzzled look when he announced the award moments earlier.

“Well, I don’t know what happened,” Kimmel said. “I blame myself for this. Let’s remember it’s just and awards show, we hate to see people disappointed but we got to see some extra speeches.”

Moonlight tells the story of a young gay black boy named Chiron, who grows up in a poor neighborhood in Miami called Liberty City and attempts to escape his rough life conditions, including drug addiction stemming from his mother. The film also won for Supporting Actor for Mahershala Ali, as well as for Best Adapted Screenplay, which writer-director Barry Jenkins and screenwriter Tarell Alvin McCraney accepted. The film is based on the play In Moonlight Black Boys Look Blue, which McCraney wrote.

Casey Affleck beat out Fences’ Denzel Washington to win the Best Actor award for his performance in writer-director Kenneth Lonergan’s family drama Manchester by the Sea. Lonergan took home the award for Best Original Screenplay.

Jenkins and McCraney pledged to stand with all the people affected by Trump’s travel ban by helping the American Civil Liberties Union (ACLU) and other similar organizations.