"La La Land" producer Jordan Horowitz holds up the winner card to the audience, proving that "Moonlight" had indeed won. Presenter Warren Beatty, seen behind Horowitz, told the crowd that he was given the wrong envelope.
Emma Stone accepts the best actress Oscar for her role in "La La Land."
Casey Affleck won best actor for his role in "Manchester by the Sea."
Damien Chazelle became the youngest person ever to win a best director Oscar. The 32-year-old won for "La La Land," which won six awards on the night.
"Moonlight" director Barry Jenkins, left, and writer Tarell Alvin McCraney accept the Oscar for best adapted screenplay. The film was based on McCraney's play "In Moonlight Black Boys Look Blue."
Ben Affleck, left, and Matt Damon present the Oscar for best original screenplay. That award went to Kenneth Lonergan for "Manchester by the Sea."
Sara Bareilles sings during the "In Memoriam" tribute.
From left, songwriters Justin Paul, Benj Pasek and Justin Hurwitz accept the Oscar for best original song ("City of Stars" from the movie "La La Land").
John Legend performed "City of Stars" on stage.
Host Jimmy Kimmel tweets US President Donald Trump during the show: "Hey @realDonaldTrump u up?"
Linus Sandgren accepts the best cinematography Oscar for his work on "La La Land."
Javier Bardem kisses Meryl Streep's hand as they present an award.
Producer Joanna Natasegara and director Orlando von Einsiedel accept the Oscar for best documentary (short subject). "The White Helmets" is about volunteer rescue workers in Syria.
Seth Rogen, left, and Michael J. Fox were on stage together to present an award. Before that, Rogen paid homage to Fox and the '80s film "Back to the Future," which Rogen said inspired him.
Alan Barillaro, left, and Marc Sondheimer accept the Oscar for best animated short film ("Piper").
During the show, a tour group was brought into the Kodak Theater as a surprise.
Some of the people on the tour interacted with actors near the front, including Denzel Washington.
Comedian Jimmy Kimmel was hosting the show for the first time.
Actor Jackie Chan received an honorary Academy Award, as did film editor Anne V. Coates, casting director Lynn Stalmaster and filmmaker Frederick Wiseman.
Sting plays the guitar during a performance of "The Empty Chair," a song from "Jim: The James Foley Story."
On behalf of Iranian director Asghar Farhadi, Anousheh Ansari accepts the Oscar for best foreign language film ("The Salesman"). Farhadi boycotted the Oscars because of an executive order signed by US President Donald Trump. That order, which temporarily suspended the admission of refugees and barred entry to the United States from Iran and six other Muslim-majority countries, was blocked by a federal judge earlier this month.
Charlize Theron, left, and Shirley MacLaine walk on stage to present an award. Theron said MacLaine inspired her to get into acting.
Viola Davis accepts the best supporting actress Oscar. Davis won for her role in "Fences," a Denzel Washington movie based on August Wilson's play.
Director Ezra Edelman delivers a speech next to producer Caroline Waterlow after "O.J.: Made In America" won the Oscar for best documentary feature. "O.J.: Made In America" was a five-part miniseries that explored the life of former football star O.J. Simpson.
Lin-Manuel Miranda performs before 16-year-old Auli'i Cravalho took the stage for "How Far I'll Go." Miranda wrote the song for the animated film "Moana."
Cravalho sings "How Far I'll Go," which was nominated for best original song.
Former NASA physicist and mathematician Katherine Johnson, third from left, appears on stage with some of the leading ladies of "Hidden Figures": Janelle Monae, Taraji P. Henson and Octavia Spencer. "Hidden Figures" is a true story about the unsung African-American women whose math and engineering smarts helped power the US space program in the 1960s.
Kate McKinnon and Jason Bateman present the awards for costume design as well as makeup and hairstyling.
Mahershala Ali accepts the best supporting actor Oscar for his role in "Moonlight."
Meryl Streep, seen here in the audience, was nominated for her role in "Florence Foster Jenkins." She has a record 20 Oscar nominations.
Justin Timberlake opened the show by singing his hit "Can't Stop The Feeling." It was one of the nominees for best original song.
Timberlake performs on stage.