Steve McQueen’s slavery odyssey, based on Solomon Northup’s 1853 memoir, has been hailed as a landmark corrective to the movie industry’s long omission of slavery stories, following years of whiter tales like 1940 best-picture winner “Gone With the Wind.”

The British director dedicated the honor to those past sufferers of slavery and “the 21 million who still endure slavery today.”

“Everyone deserves not just to survive, but to live,” said McQueen, who promptly bounced into the arms of his cast. “This is the most important legacy of Solomon Northup.”

Anthony Katagas, from left, Jeremy Kleiner, Dede Gardner, Steve McQueen, and Brad Pitt pose in the press room with the award for best picture of the year for “12 Years a Slave” on Sunday during the Oscars. (Photo by Jordan Strauss/Invision/AP)

A year after celebrating Ben Affleck’s “Argo” over Steven Spielberg’s “Lincoln,” the Academy of Motion Picture Arts and Sciences opted this time for stark realism over more plainly entertaining candidates like the 3-D space marvel “Gravity” and the starry 1970s caper “American Hustle.”

Those two films came in as the leading nominee getters. David O. Russell’s “American Hustle” went home empty-handed, but “Gravity” triumphed as the night’s top award-winner. Cleaning up in technical categories like cinematography and visual effects, it earned seven Oscars including best director for Alfonso Cuaron. The Mexican filmmaker is the category’s first Latino winner.

“It was a transformative experience,” said Cuaron, who spent some five years making the film and developing its visual effects. “For a lot of people, that transformation was wisdom. For me, it was the color of my hair.” To his star Sandra Bullock, the sole person on screen for much of the lost-in-space drama, he said: “Sandra, you are ‘Gravity.’”

But history belonged to “12 Years a Slave,” a modestly budgeted drama produced by Brad Pitt’s production company, Plan B, that has made $50 million worldwide — a far cry from the more than $700 million “Gravity” has hauled in. It marks the first time a film directed by a black filmmaker has won best picture.

Host Ellen DeGeneres, in a nimble second stint that seemed designed to be an antidote to the crude humor of Seth MacFarlane last year, summarized the academy’s options in her opening monologue: “Possibility number one: ‘12 Years a Slave’ wins best picture. Possibility number two: You’re all racists.”

DeGeneres presided over a smooth if safe ceremony, punctuated by politics, pizza and photo-bombing. Freely circulating in the crowd, she had pizza delivered, appealing to Harvey Weinstein to pitch in, and gathered stars to snap a selfie she hoped would be a record-setter on Twitter (It was: Long before midnight, the photo had been retweeted more than 2 million times). One participant, Meryl Streep, giddily exclaimed: “I’ve never tweeted before!”

But in celebrating a movie year roundly called an exceptional one, the Oscars fittingly spread the awards around. The starved stars of the Texas AIDS drama “Dallas Buyers Club” were feted: Matthew McConaughey for best actor and Jared Leto for best supporting actor.

McConaughey’s award capped a startling career turnaround, a conscious redirection by the actor to tack away from the romantic comedies he regularly starred in, and move toward more challenging films. He said he’s always chasing a better version of himself, his “hero”: “Every day, every week, every month of my life, my hero’s always 10 years away.”

“It sort of feels like a culmination,” he said backstage.

Leto passed around his Oscar to members of the press backstage, urging them to “fondle” it. The long-haired actor, who has devoted himself in recent years to his rock band 30 Seconds to Mars, gravely vowed: “I will revel tonight.”

Cate Blanchett took best actress for her fallen socialite in Woody Allen’s “Blue Jasmine,” her second Oscar. Accepting the award, she challenged Hollywood not to think of films starring women as “niche experiences”: “The world is round, people!” she said to hearty applause.

Draped in Nairobi blue, Lupita Nyong’o — the Cinderella of the awards season — won best supporting actress for her indelible impression as the tortured slave Patsey. It’s the feature film debut for the 31-year-old actress.

Disney’s global hit “Frozen” won best animated film, marking — somewhat remarkably — the studio’s first win in the 14 years of the best animated feature category. (Pixar, which Disney owns, has regularly dominated.) With a box-office that recently passed $1 billion globally, the film was sure to be the biggest hit to take home an Oscar on Sunday. The film’s “Let It Go” won best original song.