Steve McQueen's 12 Years A Slave has resisted the force of Gravity to be named best picture at the Oscars.

The slavery epic also picked up awards for best adapted screenplay and best supporting actress for Lupita Nyong'o on a night when it seemed - for a while at least - that Gravity was going to sweep the board.

The outer-space drama picked up a handful of Oscars for its backroom staff - many of whom are British - and the best director award for Alfonso Cuaron.

But McQueen, the former modern artist-turned film-maker got his moment in the spotlight as the ceremony in Los Angeles ended in triumph for his film which is based on the story of a free New Yorker, Solomon Northup, kidnapped and sold into slavery in the Deep South of the United States

Brad Pitt, who helped produce the film, praised the man who "brought us all together to tell that story - that is the indomitable Mr Steve McQueen".

McQueen, a Londoner who now lives in Amsterdam, thanked his wife who first showed him a copy of Northup's original story for "unearthing this treasure for me".

He said: "Everyone deserves not just to survive but to live. This is most important legacy of Solomon Northup. I dedicate this award to all the people who have endured slavery and 21 million people who still suffer slavery today".

The best actor Oscar went to Matthew McConaughey for Dallas Buyers Club and Cate Blanchett was named best actress for her role in Woody Allen's Blue Jasmine, beating Bullock, Dame Judi Dench, Amy Adams and Meryl Streep in the process.

Accepting her award, she praised her fellow actresses including the "sublime" Sally Hawkins and said films with strong female characters were not "niche".

She said: "audiences want to see them and in fact they earn money".

Accepting her award, Nyong'o thanked McQueen for casting her in a film which she said had "been the joy of my life".

She said: "I'm certain the dead are standing about you and they are grateful and so am I".

Speaking backstage, she said McQueen had "really honoured a people that have been unsung through doing this film".

The star, who admitted to feeling "a little dazed", said: "I am going to the Governors Ball and doing all things Oscar related, this is my first time here and I feel like Willy Wonka in the chocolate factory."

McConaughey's Dallas Buyers Club co-star Jared Leto was the first big winner on the night and promised to celebrate to "the break of dawn".

Les Miserables star Anne Hathaway handed the Oscar for best supporting actor to Leto for his role as an HIV-positive transgender woman in the film.

Leto, who dedicated his win to the "36 million people who have lost the battle to Aids", beat big names including Michael Fassbender who was nominated for 12 Years A Slave.

Speaking backstage, Leto said: "I never thought this would happen, nobody talked about results or awards or potential, only how could we do the best job to bring this story to life. I never in a million years dreamed I would be here talking to you, it was a fantasy. I never dreamed they would give me a prize, I never won an award for doing anything on screen until Dallas Buyers Club.

"I am going to be celebrating to the break of dawn, look me in the eyes and see I will revel tonight. If they only knew what was going to happen tonight, the stories we would have to tell."

There were two early British wins with the visual effects team behind Gravity picking up an Oscar before the award for best documentary short went to The Lady in Number 6: Music Saved My Life - a week after its inspiration, pianist and world's oldest Holocaust survivor, Alice Herz-Sommer, 110, died in London.

Director Malcolm Clarke, who now lives in Canada but learned his trade at the BBC and Granada TV, dedicated the win to her "extraordinary capacity for joy and her amazing capacity for forgiveness".

The event, known formally as the 86th Academy Awards, is broadcast around the world from the Dolby Theatre in Los Angeles.

Host Ellen DeGeneres opened the show with a string of gags poking fun at the event, before taking selfies of the stars and at one point ordering pizzas.

The technical expertise of the UK film industry was recognised when Gravity picked up awards for sound mixing and sound editing.

Bill Murray paid tribute to his Ghostbusters co-star Harold Ramis, who died last month, before handing over another award - this time for cinematography - to Gravity which continued to pick up awards when director Alfonso Cuaron and Mark Sanger won the Oscar for film editing.

Ramis was also remembered in a section of the ceremony dedicated to those who died in the 12 months since the last ceremony along with names including Philip Seymour Hoffman, Peter O'Toole and Richard Griffiths.

Sherlock star Benedict Cumberbatch joined Jennifer Garner on stage to present the award for production design to The Great Gatsby, before the Oscar for original score went to Steven Price for Gravity.

The musician from Nottingham praised Cuaron for inspiring him and thanked his family, joking: "Mum, Dad, Jenny sorry I made so much noise while I was growing up."

Speaking backstage, Price said: "My house was full of music, my main memories are of the record player at home, it was all Beatles and Stones and we danced around the living room, that started me off on instruments and I've done nothing else ever since."

U2 lost out on the chance for an Oscar when the award for best song went to Let It Go from Frozen and Steve Coogan failed to win the best adapted screenplay Oscar for Philomena with 12 Years A Slave writer John Ridley picking up the prize.