Moonlight has won best picture at the Oscars - but only after an error saw La La Land initially declared the winner.
The La La Land producers were in the middle of their acceptance speeches when the mistake was discovered.
PriceWaterhouseCooper, the accountancy firm responsible for counting the ballots, apologised for the mix-up.
La La Land still ended up the biggest winner of the night, taking home six Oscars including a best actress award for Emma Stone.
Moonlight's surprise best picture win took its haul to three, the low-budget film having earlier won the adapted screenplay award and a best supporting actor prize for Mahershala Ali.
Casey Affleck was named best actor for Manchester by the Sea, while Viola Davis was named best supporting actress for Fences.
Damien Chazelle, La La Land's 32-year-old director, became the youngest film-maker to win the best director Oscar.
Yet this year's ceremony will be remembered for its closing moments, when Warren Beatty and Faye Dunaway arrived on stage to announced the best picture winner.
Beatty had been mistakenly handed the previous winner's envelope, containing a card that said Emma Stone had won best actress for La La Land.
In a statement, PriceWaterhouseCooper "sincerely" apologised for the error, which it said was down to the presenters having "mistakenly been given the wrong category envelope".
"We are currently investigating how this could have happened, and deeply regret that this occurred."
Host Jimmy Kimmel said he blamed Steve Harvey for the error - a reference to Harvey's mistake in announcing the Miss Universe winner in 2015.