And the loser is ... PricewaterhouseCoopers.

The global accounting firm has apologized for the embarrassing envelope mix-up that resulted in "La La Land" being wrongly announced as best picture at the Oscars.

It's still not clear exactly how PwC, which has administered the Oscars balloting process for more than 80 years, allowed the wrong red envelope to be carried on stage in a snafu that spoiled Hollywood's biggest moment of the year.

PwC says it maintains control over "all aspects" of the Academy's voting process.

The firm has sole custody of all votes, and is responsible for keeping the results confidential. Once the ballots have been tabulated, two senior accountants memorize every winner, and then prepare two briefcases with the envelopes used by presenters on the big night.

The two accountants -- Martha Ruiz and Brian Cullinan -- carry the briefcases to the ceremony via "separate, secret routes." The pair stand backstage and hand envelopes to award presenters before they walk onstage.

It was a breakdown in the final stage of this process that led presenter Faye Dunaway to announce "La La Land" as the winner of cinema's most prestigious prize, only for "Moonlight" to be confirmed as the true champion moments later.

What went wrong?

The first sign that something was amiss came when Warren Beatty took an extended pause before showing the card to his fellow presenter. Dunaway went ahead, pronouncing "La La Land" as best picture.

The cast and crew of the musical reacted in typical fashion: They bounded up to the stage and began issuing a flurry of "thank yous" to supporters and family members. A man wearing a headset and holding an envelope then appeared onstage.

It fell to "La La Land" producer Jordan Horowitz to explain that something had gone very wrong.

"I'm sorry, there's a mistake. 'Moonlight,' you guys won best picture."

"This is not a joke," he said. He flashed the real card at the crowd: "Moonlight," it read.

Beatty suggested that he had been given the wrong envelope.

"I want to tell you what happened," Beatty said before leaving the stage. "I opened the envelope and it said 'Emma Stone, La La Land.' That's why I took such a long look at Faye."

Cullinan, the managing partner for PwC's business in Southern California, explained the envelope logistics in an interview published on Medium on February 10.

"The producers decide what the order of the awards will be. We each have a full set. I have all 24 envelopes in my briefcase; Martha has all 24 in hers. We stand on opposite sides of the stage, right off-screen, for the entire evening, and we each hand the respective envelope to the presenter. It doesn't sound very complicated, but you have to make sure you're giving the presenter the right envelope," he said.

It's not clear why two sets of envelopes are needed, but security appears to be a major concern for PwC. The briefcases used are kept under lock and key, for example.

The apology

PwC apologized to the casts of both films, as well as Beatty and Dunaway, for the "error."

"The presenters had mistakenly been given the wrong category envelope and when discovered, was immediately corrected," the firm said in a statement. "We are currently investigating how this could have happened, and deeply regret that this occurred.

PwC has in the past portrayed its involvement in the Oscars as a symbol of its integrity.

"PwC's role in the Oscars balloting process represents the firm's lasting legacy of utmost accuracy and confidentiality," Ruiz said in a statement issued before the 2015 ceremony.

Related: The full list of Oscar winners

On Sunday, Cullinan's twitter feed was filled with photos taken backstage at the event -- including best supporting actress Viola Davis and best actress Emma Stone.

Later, after PwC issued its apology, all Oscar night tweets disappeared from Cullinan's account.

"We appreciate the grace with which the nominees, the Academy, ABC, and [host] Jimmy Kimmel handled the situation," PwC said in its statement.