Maria Puente, and Andrea Mandell

USA TODAY

The accountants did it?

We all watched in shock as it happened. Now we know exactly what happened.

PricewaterhouseCoopers, which has handled the accounting for the Academy Awards since 1934, early Monday apologized for giving the wrong envelope to presenters Warren Beatty and Faye Dunaway before the two actors erroneously announced La La Land as best picture at Sunday night's Oscars. In actuality, Moonlight won the top prize.

Oscars 2017: Every crazy thing we saw backstage — including THAT flub

In Beatty's hand was a spare best actress envelope. Emma Stone had already been given her winning envelope, but two sets are printed, one for each of the two PwC representatives who wait in the wings to distribute the envelopes to presenters.

"At the end of the day, we made a human error," Tim Ryan, U.S. chairman and senior partner of PwC told USA TODAY on Monday. "We made a mistake. What happened was, our partner on the left side of the stage, Brian Cullinan, he handed the wrong envelope to Warren Beatty. And then the second we realized that, we notified the appropriate parties and corrected the mistake."

But several speeches by La La Land producers had already been given, and celebrating was underway.

"We apologize to the cast of La La Land for having to have made those speeches in the time that it took to (correct it)," says Ryan. "Immediately when it was announced, again, because of our mistake, both our partners who knew who the winner was — and they’re the only two who know — they realized the mistake had been made and they began to notify the appropriate people.

"It was a little chaotic and just took time to get out onstage and let people know that the mistake was made. And unfortunately that took enough time to get through two-and-a-half acceptance speeches."

PricewaterhouseCoopers 'deeply' regrets Oscars flub, vows to investigate

It's puzzling because the Oscar process — counting the votes, determining the winners, filling the envelopes, packing two briefcases, toting them to the ceremony, handing the envelopes to presenters — is long-established.

Oscars flub engulfs PricewaterhouseCoopers in controversy

Prior to the Oscars, Cullinan, a managing partner at PwC, and Martha Ruiz, a tax partner at PwC, described how the winning envelopes are handled.

After voting closes a week before the live Oscars telecast, accountants start tabulating, which takes about three days. Secrecy and accuracy are the watchwords. "While we have a team counting the ballots, none of our team members see more than a portion of the ballots in any category. The final tabulation of the winners is only done by the two of us," Cullinan and Ruiz wrote at The Huffington Post.

They check and recheck, identify the names with the highest number of votes in each category, and insert two sets of the cards declaring the winners into sealed envelopes, which are secured in a secret location until they are brought to the show.

"At the event, we are both backstage to hand the envelopes to the presenters. We also memorize Every. Single. Winner. In. Every. Single. Category. The winners’ names are not typed into a computer or written down, to avoid potential lost slips of paper or breaches of security," Cullinan and Ruiz explained.

Here's where it gets even more fascinating, considering Sunday's flub: It could only have been a PricewaterhouseCoopers rep who gave the wrong envelope to Beatty and Dunaway.

Backstage, Cullinan and Ruiz "hand each envelope directly to the presenter in each category. We are positioned on either side of the stage, so we can hand envelopes from stage right or stage left."

Ryan says he has apologized to the Academy of Motion Picture Arts and Sciences and is contacting the producers of La La Land and Moonlight.

"I have spoken with the Academy and expressed our apologies and accountability, and I am in the process of reaching out to the other affected parties," said the PwC chairman. "That has not happened yet, but I am in the process of doing that."

Oscars 2017: 5 big moments you need to know

But not to worry, says Anthony Sabino, a law professor at St. John’s University’s Peter J. Tobin College of Business. It was a "black eye" for PwC, but black eyes heal. He predicts no long-lasting effects.

"While all the facts are not in yet, it would appear to be simple human error," Sabino says. "After decades of flawless performance, it was bound to happen eventually. For an event as complex and as secretive as the Academy Awards, PwC's sterling record still stands out.”