Confusion reigned after Warren Beatty read out 'La La Land' for best picture before realising he had the wrong card. 'Moonlight' capped an evening in which colour returned to the Academy's big night.
The African-American coming-of-age story, Moonlight, won the Oscar for best picture on Sunday, but not before a mishap that saw the wrong cast and crew on stage.
Presenters Warren Beatty and Faye Dunaway initially announced that the romantic musical and favourite La La Land had won.
Organiser realised they had the wrong winners, and the cast of Moonlight was called to the podium. With the casts of both films on stage, Beatty explained he had been given the wrong envelope. The Academy and Oscar auditors, PricewaterhouseCoopers, later apologised for the screw up.
It was the first time in living memory that such a major mistake had been made at the Academy Awards, Hollywood's biggest night.
TRT World's Vanessa Conneely has more on the gaffe.
And the award goes to...
Moonlight is about a young boy struggling with poverty and his sexuality as he grows up in black Miami. Moonlight producer Adele Romanski said she hoped the movie would inspire "little black boys and brown girls and other folks watching at home who feel marginalised."
It also brought a supporting actor Oscar for first timer Mahershala Ali, the first Muslim to win an Oscar.
Best actor went to Casey Affleck (Manchester by the Sea) and best actress to Emma Stone (La La Land), both first-time winners, as was Viola Davis, who won best supporting actress for her role as a long-suffering housewife in African-American family drama Fences.
The recognition for Davis and Ali and their films was in stark contrast to the 2016 Academy Awards when no actors of colour were even nominated.
La La Land went into the Oscars with a leading 14 nominations and emerged with six wins, including for its score and theme song City of Stars. La La Land director Damien Chazelle, 32, became the youngest person to win a best director Oscar.
TRT World's Frances Read reports from Los Angeles.
Trump at the Oscars – not
The onstage gaffe trumped the litany of jokes and satire about US President Donald Trump that had been the hallmark of the night at the Dolby Theatre in Hollywood.
Host Jimmy Kimmel fired off political zingers from the opening of the show, and even tweeted to the Republican president, getting no immediate response.
"This broadcast is being watched live by millions of Americans, and around the world in more than 225 countries that now hate us, and I think that is amazing," the late-night television star said moments after stepping onto the stage.
Several celebrities wore blue ribbons on Sunday in support of the American Civil Liberties Union (ACLU) advocacy group that worked to get Trump's bid to ban travellers from seven majority Muslim nations blocked in US courts.
Iranian director Asghar Farhadi boycotted Sunday's ceremony because of the Trump travel ban. His drama The Salesman was named best foreign language film.