‘‘I was sort of hallucinating when that was happening,’’ Affleck said backstage alongside fellow ‘‘Argo’’ producers George Clooney and Grant Heslov. ‘‘Honestly, I was just asking these two guys outside, was that Michelle Obama? ... Anyway, it was very cool.’’
Hathaway is the third performer in a musical to win supporting actress during the genre’s resurgence in the last decade.
‘‘It came true,’’ said Hathaway, who joins 2002 supporting-actress winner Catherine Zeta-Jones for ‘‘Chicago’’ and 2006 recipient Jennifer Hudson for ‘‘Dreamgirls.’’ Hathaway had warm thanks for ‘‘Les Miz’’ co-star Hugh Jackman, with whom she once sang a duet at the Oscars when he was the show’s host.
‘‘Life of Pi’’ also won for Mychael Danna’s multicultural musical score that blends Indian and Western instruments and influences, plus cinematography and visual effects.
‘‘I really want to thank you for believing this story and sharing this incredible journey with me,’’ Lee said to all who worked on the film, a surprise blockbuster about a youth trapped on a lifeboat with a Bengal tiger.
‘‘Argo’’ also claimed the Oscar for adapted screenplay for Chris Terrio, who worked with Affleck to create a liberally embellished story based on an article about the rescue and part of CIA operative Tony Mendez’s memoir.
Terrio dedicated the award to Mendez, saying ‘‘33 years ago, Tony, using nothing but his creativity and his intelligence, Tony got six people out of a bad situation.’’
The foreign-language prize went to Austrian filmmaker Michael Haneke’s old-age love story ‘‘Amour,’’ which tells the agonizing story of an elderly man (Jean-Louis Trintignant) tending his wife (Emmanuelle Riva) as she declines from age and illness.
The Scottish adventure ‘‘Brave,’’ from Disney’s Pixar Animation unit, was named best animated feature. Pixar films have won seven of the 12 Oscars since the category was added.
The upbeat musical portrait ‘‘Searching for Sugar Man’’ took the documentary feature prize. The film follows the quest of two South African fans to discover the fate of acclaimed but obscure singer-songwriter Sixto Rodriguez, who dropped out of sight after two albums in the 1970s and was rumored to have died a bitter death.
There was a rare tie in one category, with the Osama bin Laden thriller ‘‘Zero Dark Thirty’’ and the James Bond tale ‘‘Skyfall’’ each winning for sound editing.
William Shatner made a guest appearance as his ‘‘Star Trek’’ character Capt. James Kirk, appearing on a giant screen above the stage during MacFarlane’s monologue, saying he came back in time to stop the host from ruining the Oscars.
‘‘Your jokes are tasteless and inappropriate, and everyone ends up hating you,’’ said Shatner, who revealed a headline supposedly from the next day’s newspaper that read, ‘‘Seth MacFarlane worst Oscar host ever.’’
The performance-heavy Oscars also included an opening number featuring Charlize Theron and Channing Tatum, who did a classy dance while MacFarlane crooned ‘‘The Way You Look Tonight.’’ Daniel Radcliffe and Joseph Gordon-Levitt then joined MacFarlane for an elegant musical rendition of ‘‘High Hopes.’’
Halle Berry introduced a tribute to the Bond franchise, in which she has co-starred, as the British super-spy celebrated his 50th anniversary on the big-screen last year with the latest adventure ‘‘Skyfall.’’ Shirley Bassey sang her theme song to the 1960s Bond tale ‘‘Goldfinger.’’ Later, pop star Adele performed her theme tune from ‘‘Skyfall,’’ which won the best-song Oscar.
A salute to the resurgence of movie musicals in the last decade included Oscar winners Zeta-Jones singing ‘‘All That Jazz’’ from ‘‘Chicago’’ and Hudson doing ‘‘And I Am Telling You I'm Not Going’’ from ‘‘Dreamgirls.’’ Hathaway and Jackman joined cast mates of best-picture contender ‘‘Les Miserables’’ to sing songs from their musical.
Academy officials said all performances were sung live.
Fans had pondered how far MacFarlane, the impudent creator of ‘‘Family Guy,’’ might push the normally prim and proper Oscars. MacFarlane was generally polite and respectful, though he pressed his luck a bit on an Abraham Lincoln joke.
‘‘I would argue that the actor who really got inside Lincoln’s head was John Wilkes Booth,’’ MacFarlane wisecracked, earning some groans from the crowd. ‘‘A hundred and 50 years later, and it’s still too soon?’’
AP writers Christy Lemire, Lynn Elber, Hannah Dreier, Ryan Nakashima, Sandy Cohen, Beth Harris and Anthony McCartney contributed to this report.