Image copyright Getty Images Image caption Martha Ruiz and Brian Cullinan before Sunday's Oscars ceremony

The man in charge of the Oscars awards envelopes has been blamed for the gaffe that saw La La Land named best picture.

PriceWaterhouseCoopers accountant Brian Cullinan was supposed to hand the best picture envelope to presenters Warren Beatty and Faye Dunaway on Sunday.

In a statement, PwC said he "mistakenly handed [them] the back-up envelope for actress in a leading role instead."

It's also emerged that Cullinan tweeted a picture of Emma Stone backstage just minutes before the mix-up took place.

The tweet has since been deleted, though it survives on various websites and on a cached Google page.

Image copyright @briancullinan_

Cullinan had a complete set of envelopes on one side of the stage, while Martha Ruiz, another PwC accountant, had a duplicate set on the other.

This explains why both best actress winner Emma Stone and Beatty ended up in possession of an envelope related to the best actress award.

Beatty was evidently confused by the contents of the envelope, passing the card onto his former Bonnie and Clyde co-star.

Seeing the words "La La Land" beneath Emma Stone's name, Dunaway declared her musical romance the winner of the best picture award.

Image copyright Getty Images Image caption Faye Dunaway and Warren Beatty famously co-starred in 1967's Bonnie and Clyde

Only after that film's producers had begun their acceptance speeches was it revealed that Moonlight had in fact won the award.

"Once the error occurred, protocols for correcting it were not followed through quickly enough by Mr Cullinan or his partner," said the accountancy firm.

One of Cullinan's colleagues told Variety that the accountant "feels very, very terrible" and "is very upset about this mistake".

The mix-up brought a chaotic end to Sunday's Oscars ceremony, hosted in Los Angeles by talk show host Jimmy Kimmel.

Here are six more things we've learned about one of the most extraordinary awards show debacles in recent times.

1) The Academy is really, really sorry

The organisers of the Academy Awards "deeply regret the mistakes" that led to La La Land being wrongly named best picture.

Moonlight had actually won the award, but the envelope mix-up led to Dunaway announcing the wrong film.

"We apologise to the entire cast and crew of La La Land and Moonlight whose experience was profoundly altered by this error," the Academy said.

Image copyright Reuters Image caption Ryan Gosling (left) reacts to Moonlight being confirmed as best picture

"We salute the tremendous grace they displayed under the circumstances."

In its statement, the Academy said PwC had "taken full responsibility for the breaches of established protocols that took place during the ceremony.

"We have spent last night and today investigating the circumstances, and will determine what actions are appropriate going forward."

2) It was all down to Trump

President Trump and his policies were at the forefront of many attendees' minds on Sunday, with Gael Garcia Bernal among those to take issue with them on stage.

"As a Mexican, as a Latin-American, as a migrant worker, as a human being, I'm against any form of wall that separates us," the actor said - a reference to Trump's plans to build a border wall between Mexico and the US.

Image copyright Getty Images Image caption Gael Garcia Bernal presented an award on Sunday with actress Hailee Steinfeld

In his first comments on the Oscars, the president has suggested the awards "were focused so hard on politics that they didn't get the act together at the end".

"It was a little sad," he told the right-wing Breitbart website. "It took away from the glamour of the Oscars. It didn't feel like a very glamorous evening.

"I've been to the Oscars," continued the president. "There was something very special missing, and then to end that way was sad."

3) It didn't help the ratings

The extraordinary end to Sunday's ceremony came too late to help boost the show's ratings, which were its smallest for almost 10 years.

ABC's broadcast drew 32.9 million viewers in the US - a 4 per cent drop on the 2016 Oscars, which were seen by 34.4 million people.

It was the smallest audience since the 2008 ceremony, which drew an average audience of 32 million.

Despite the decline, the Oscars are still expected to be the most-watched non-sporting event on US TV this year.

4) Kimmel was meant to end the show with Matt Damon

Back in his usual slot on late night television, Jimmy Kimmel revealed that he had originally intended to end the show in the audience, sat next to actor Matt Damon.

"We're sitting there and we notice some commotion going on," the Oscars host explained on Monday's edition of Jimmy Kimmel Live. "And Matt says, 'I think I heard the stage manager say they got the winner wrong.'

Image copyright Getty Images Image caption Kimmel was meant to end the show next to Matt Damon, with whom he'd previously sparred

"So you just kind of, well, the host will go onstage and clear this up. And then I remember, oh, I'm the host."

"Have any of you here ever hosted the Oscars before?" Kimmel asked his audience. "Well, except for the end - it was a lot of fun.''

The result, he joked, "was the weirdest TV finale since Lost" - a reference to the long-running US drama series about strangers stranded on a tropical island.

5) Faye Dunaway's heels may have been involved

According to Tuesday's Daily Mail, Beatty and Dunaway were meant to have descended a staircase before presenting the final award of the evening.

But the paper claims the 76-year-old had difficulty climbing up the stairs in her high heels, so the pair started their presentation walk at the foot of the stairs instead.

"It's unclear whether this confusion contributes to the ensuing chaos," the paper's report continues.

6) The US State Department also had Twitter issues

The US State Department's official Persian-language Twitter account tweeted congratulations to the Iranian people and Asghar Farhadi after the director's film The Salesman won the best foreign language film award.

Image copyright Reuters Image caption Farhadi's award was accepted on his behalf by Iranian-American scientists Firouz Naderi and Anousheh Ansari

That was despite Farhadi, who did not attend the ceremony, having a speech read out in which he described President Trump's travel ban as "inhumane".

A State department spokeswoman said the tweet was deleted "to avoid any misperception that the USG [US government] endorsed the comments made in the acceptance speech."

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.