Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

After one of the most cringe-worthy, watch-through-your-fingers blunders in Oscars history, the company responsible for the winners' envelopes apologized Monday and promised a full investigation into how the wrong film was announced for the best picture category.

The 89th Academy Awards will be remembered for all the wrong reasons after presenters Warren Beatty and Faye Dunaway signaled that "La La Land" had won during the evening's climax — even though "Moonlight" had actually taken the prize.

Accounting firm PricewaterhouseCoopers, known as PwC, is in charge of tallying up the votes and distributing the envelopes. It quickly issued a mea culpa.

Given how much pride the Academy Awards and PwC take in what is supposed to be an ironclad process, how did such a monumental gaffe occur?

PwC said Beatty and Dunaway "had mistakenly been given the wrong category envelope." This tallied with Beatty's on-stage explanation shortly after the flub was corrected.

"I want to tell you what happened," he told the audience. "I opened the envelope and it said, 'Emma Stone, La La Land.' That's why I took such a long look at Faye and [the audience]. I wasn't trying to be funny."

He and Dunaway had indeed exchanged awkward glances and their announcement was hesitant to say the least.

The audience likely thought this was a lighthearted attempt to prolong the suspense, although it wasn't clear why the presenters continued with the announcement despite clearly having the wrong envelope — naming an actress instead of a film.

At this point, backstage staff already knew something awful had just happened.

A stagehand in the wings was pacing back and forth repeating: "Oh ... Oh my god, he got the wrong envelope," the LA Times reported.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

PHOTOS: Oscars Best Picture Fiasco Unfolds Onstage at Academy Awards

The "La La Land" team was still celebrating when producer Jordan Horowitz took to the microphone to say: "There's been a mistake. 'Moonlight,' you guys won best picture." He then passed his statue to the "Moonlight" producers, adding: "This is not a joke."

This was met with gasps in the audience and, later, amazement backstage. "Is that the craziest Oscar moment of all time?" said Emma Stone, who won best actress for her performance in "La La Land."

All the winners' envelopes are guarded by two PwC partners, Brian Cullinan and Martha Ruiz, who are also the only two people who know the results beforehand.

#Oscars: The 2 best secret keepers in the world. @PwC_LLP's @briancullinan_ and @MarthaLTRuiz--the only ones on earth who know the winners! pic.twitter.com/Y3YCYqk37F — Robert Kovacik (@RobertNBCLA) February 25, 2017

They take pride in what they have described as a meticulously organized operation, one that supposedly prepares for every eventuality and problem. The pair are solely responsible for counting the votes of the 7,000 Academy of Motion Picture Arts and Sciences members.

"It's up to Brian and I to fully count everything together once, twice and sometimes multiple times to make sure it's correct," Ruiz told the BBC last week.

This is all done manually, with Cullinan and Ruiz leading a "crack team of accountants to count the ballots and tally the results," according to PwC.

Before Sunday's fiasco, the company said this process involves "no scanning machines. No computers ... [and] no security breaches."

Warren Beatty holds the envelope containing the name of what he believes is the best picture winner but instead reads "Actress in a Leading Role." Kevork Djansezian / Getty Images

The counting isn't the end of it.

Cullinan and Ruiz then memorize every winner in case something happens to the envelopes, even quizzing each other to make sure they know every actress, actor, film, director, song and technical crew.

They each carry a briefcase containing a complete set of ballots, taking different routes to Hollywood's Dolby Theatre in case one of them gets held up in traffic. They even have constant security provided by the LAPD, and stand at opposite sides of the stage handing ballots to the presenters.

Related: 'The Susan Lucci of the Oscars' Finally Ends Losing Streak

It's a system that has worked without major incident for the past 83 years, the time PwC has been responsible for counting the Oscars votes.

"It’s such a long-term relationship [between PwC and the Oscars] that we know intricately how everything works, the timing of it, the process that we use, and they have absolute trust in us and what we do," Cullinan told Market Watch before Sunday's ceremony.

Neither partner had tweeted about the mix-up as of 7:30 a.m. local time (10:30 a.m. ET).

Unsurprisingly, the incident gave birth to a host of memes and jokes on social media — with #envelopegate trending early Monday.

I'm starting to wonder if I got nominated for Into The Wild after all. #Oscars — Emile Hirsch (@EmileHirsch) February 27, 2017

Jill Stein is already raising money for an #Oscars recount. — Matt Mackowiak (@MattMackowiak) February 27, 2017

Hey "La La Land" remember when you gave us that fake happy ending and then took it away



How's it feel — Daniel "Kibblesmith" (@kibblesmith) February 27, 2017

The best picture mix-up wasn't the only error at the ceremony.

Leading Australian producer Jan Chapman told Variety she was "devastated" after her picture was used in the In Memoriam segment paying tribute to people who had passed away.

Her image was accidentally used in the tribute to her good friend and colleague, Janet Patterson, the late Australian costume designer.

"Janet was a great beauty and four-time Oscar nominee and it is very disappointing that the error was not picked up," she told Variety in an email.