Published: 2017-02-27 11:45:17 BdST
In a mishap that caused uproar and confusion, presenters Warren Beatty and Faye Dunaway initially announced that romantic musical "La La Land", the presumed favourite for best picture, had won.
As the casts of both films stood awkwardly on stage, Beatty explained he had been given the wrong envelope to open.
It was the first time in living memory that such a major mistake had been made at the Academy Awards, Hollywood's biggest night. It even eclipsed the prior three hours of a show peppered with jokes about US President Donald Trump.
Officials from the Academy of Motion Picture Arts and Sciences and accountants Price Waterhouse Cooper who oversee the ballots, were not immediately available to comment.
"La La Land" Producer Jordon Horowitz holds up the card for the Best Picture winner 'Moonlight' after the onstage gaffe. Reuters
"Moonlight," about a young boy struggling with poverty and his sexuality in Miami, also brought a supporting actor Oscar for first timer Mahershala Ali, a best adapted screenplay statuette.
Viola Davis won for her supporting role as a long suffering housewife in African-American family drama "Fences."
The recognition for both the actors and their films made a stark contrast to the 2016 Academy Awards when no actors of colour were even nominated.
89th Academy Awards - Oscars Awards Show - Best Actress winner Emma Stone accepts her award for La La Land. Reuters
'La La Land' wins six awards
"La La Land" went into the Oscars with a leading 14 nominations and emerged with six, including for its score and theme song "City of Stars." "La La Land" director Damien Chazelle, 32, became the youngest person to ever win a best director Oscar.
Elsewhere, "Manchester by the Sea" star Casey Affleck was named best actor, winning his first Oscar despite 2010 sexual harassment allegations that resurfaced during awards season. Affleck denied the allegations which were settled out of court.
89th Academy Awards - Oscars Backstage - Hollywood, California, US - 26/02/17 - Casey Affleck poses with his Oscar for Best Actor for "Manchester by the Sea". Reuters
Earlier in the show, Trump had been the butt of numerous jokes, capping an awards season marked by fiery protests by celebrities at his policies. .
Oscars host Jimmy Kimmel fired off political zingers and even tweeted at the Republican president, getting no immediate response.
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 travelers from seven majority Muslim nations blocked in US courts. But for the most part, speeches at the ceremony were mild or made general pleas for tolerance rather than directly attacking Trump.
Iranian director Asghar Farhadi was an exception. His drama "The Salesman" was named best foreign language film but Farhadi, boycotted Sunday's ceremony because of the Trump's travel ban.
In a speech delivered on his behalf by Iranian-American space expert Anousheh Ansari, Farhadi said his absence was due to "an inhumane law that bans entry into the US... Dividing the world into the 'us' and 'our enemies' categories creates fear, a deceitful justification for aggression and war."
More on Oscars