There was confusion and controversy at the Oscars after La La Land was mistakenly announced as the winner of the best picture.

The producers of the musical were already concluding their speeches when it was revealed there had been a mix-up, and Moonlight had in fact scored the top prize of the night.

Bonnie and Clyde stars Warren Beatty and Faye Dunaway had announced La La Land had taken the best picture prize and the cast and crew had flooded the stage before producer Jordan Horowitz said: "There's a mistake. Moonlight, you guys won best picture.

"This is no joke. I'm afraid they read the wrong thing. This is not a joke, Moonlight, you won best picture."

Beatty returned to the microphone to say: "I want to tell you what happened I opened the envelope and it said Emma Stone, La La Land and that is why I took such a long look at Faye and at you.

"I wasn't trying to be funny. This is Moonlight for best picture."

La La Land, which had scored a record-tying 14 nominations, ended up with just six wins, including best actress for Emma Stone and best director for Damien Chazelle, who is the youngest winner of the prize at 32.

Moonlight, which follows the life of a young black boy dealing with his sexuality, scooped three prizes in total, landing best picture, best adapted screenplay and best supporting actor for Mahershala Ali.

The film's producer Dede Gardner said: "I'm still not sure this is real. It's very humbling to be up here and I hope it's inspiring to little black boys and brown girls who feel marginalised. I hope they take some inspiration from seeing this beautiful group of artists."

Stone, 28, who has already received a Golden Globe and Bafta for her role in the hit musical, thanked Chazelle and Ryan Gosling, saying of her co-star: "Thank you for making me laugh and for always raising the bar and for being the best partner in this crazy adventure."

Ali won the first Oscar of the 89th Academy Awards when he scooped the best supporting actor prize.

He welcomed his first child Bari Najma on February 22 and thanked his wife Amatus Sami-Karim saying: "My wife was in her third trimester doing awards seasons, we just had a daughter four days ago. I just want to thank her for being such a soldier through this process."

Here is the full list of winners:

Best Picture:

Moonlight

Actor in a Leading Role:

Casey Affleck - Manchester By The Sea

Actress in a Leading Role:

Emma Stone - La La Land

Actor in a Supporting Role:

Mahershala Ali - Moonlight

Actress in a Supporting Role:

Viola Davis - Fences

Directing:

Damien Chazelle - La La Land

Adapted Screenplay:

Moonlight - Barry Jenkins

Writing (Original Screenplay):

Manchester By The Sea - Kenneth Lonergan

Animated Feature Film:

Zootopia

Cinematography:

La La Land - Linus Sandgren

Music (Original Song):

City Of Stars - La La Land

Music (Original Score):

La La Land

Makeup and Hairstyling:

Suicide Squad

Costume Design:

Fantastic Beasts and Where to Find Them

Best Documentary:

OJ Made in America

Best Sound Editing:

Arrival

Best Sound Mixing:

Hacksaw Ridge

Best Foreign Language Film:

The Salesman

Best Animated Short:

Piper

Best Production Design:

La La Land

Best Visual Effects:

The Jungle Book

Best Film Editing:

Hacksaw Ridge

Best Documentary Short:

White Helmets

Best Live-action Short:

Sing