Oscars officials are investigating an embarrassing mix-up over the best picture award, which eventually went to African-American coming-of-age drama Moonlight, after a ceremony studded with political jokes and minor mishaps.
In a mistake that stunned the Dolby Theatre crowd in Hollywood and a television audience worldwide on Sunday night, presenters Warren Beatty and Faye Dunaway at first said the winner was romantic musical La La Land, the presumed best picture favourite.
As both films' casts stood awkwardly on stage, Beatty explained he had received the wrong envelope.
PricewaterhouseCoopers, which oversees the ballots, confirmed the error and said it was investigating.
Two PricewaterhouseCoopers accountants, Brian Cullinan and Martha Ruiz, are tasked with holding all 24 winner envelopes during the ceremony.
Just days before the Oscars, Cullinan told the Huffington Post in an interview that the procedure for dealing with the hand-off of an incorrect envelope, other than signalling to a stage manager, was unclear.
"It's so unlikely," Cullinan told the Huffington Post.
While the best picture mix-up took top spot in the evening's embarrassments, the ceremony was beset with smaller blunders.
During the "in memoriam" segment, the name of celebrated Australian costume designer Janet Patterson, who died last year, was accompanied by a photo of Jan Chapman, an Australian movie producer who is alive and well.
Also, Auli'i Cravalho, the 16-year-old actress and lead voice in Disney's animated film Moana, was struck on the head with a flag waved by a backup dancer while performing the best song-nominated "How Far I'll Go".
After an award season of Hollywood standing up to US President Donald Trump, the speeches were largely mild and came with more pleas of tolerance.
Iranian director Asghar Farhadi was an exception. His drama The Salesman was named best foreign-language film, but Farhadi boycotted the ceremony because of Trump's travel ban.
In a speech given 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".