WARNING: This story contains graphic language.

The videotape of Donald Trump that is shaking up the presidential election sat forgotten on a shelf at NBC's "Access Hollywood" until just a few days ago.

On Monday, according to an NBC source, one of the entertainment newsmagazine's producers remembered Trump's 2005 taping session with former "Access" co-host Billy Bush.

Trump's offensive comments about Alicia Machado were still making waves. And the Associated Press had just published a detailed story quoting former "Apprentice" employees saying Trump "was lewd and sexist" while taping the reality show.

With that in mind, a producer dug up the tape.

By mid-week, executive producer Rob Silverstein and his producing team had taken a look at its contents, and discovered that among other things it included a moment in which Trump told Bush, "And when you're a star, they let you do it. You can do anything... Grab them by the pussy. You can do anything."

It also included Trump saying he once tried and failed to have sex with Nancy O'Dell, who was Bush's co-host at the time.

After reviewing the tape, "we were debating what to do" with it, an NBC source explained.

By Friday morning, Silverstein had decided to broadcast it, and a script had been written. The story was not slated to air on Friday night's edition of the show, however.

That means the earliest it would have aired is Monday night -- after Sunday's presidential debate.

Another NBC source confirmed that "Access" was working on a story, and that NBC News knew about it, but said that as of Friday morning the story "wasn't quite finalized."

That's when Silverstein was notified that David Fahrenthold of The Washington Post had come into possession of a copy.

Fahrenthold, who has been reporting for months on Trump's charitable donations and the Trump Foundation, was contacted around 11 a.m. on Friday by a source who told him about the footage, according to a Post story about how he got this scoop.

Fahrenthold asked NBC for comment about the tape around noon Eastern time. The producers at "Access," which is based in California, were blindsided by Fahrenthold's call.

According to the Post, Farenthold knows the identity of the person who leaked the video to him, but will not disclose it.

Sources at NBC believe someone inside NBC downloaded the footage from one of the network's video servers. The tape was accessible internally since the "Access" story was already in the works.

Silverstein told Page Six on Friday afternoon, "I don't know who leaked it. I have no idea."

After the Post called NBC for comment, NBC News staff hurried to finish a story about it. So did the "Access" staff.

On Friday night's edition of the newsmagazine, co-host Natalie Morales reported on the tape, linking it to Monday's investigation by The A.P.

Morales also noted that Trump has appeared on the show "hundreds of times" over the years.

"In the course of reporting on Mr. Trump, we have reviewed much of our own footage," she said.

So does "Access" have other tapes of Trump speaking in vulgar terms? One of the NBC sources said, "Not that I know of."

O'Dell and "Entertainment Tonight," the show she now co-anchors, both declined to comment. But Brad Bessey, the former executive producer of "Entertainment Tonight," said in a tweet that O'Dell is "is classy, beautiful, family-focused, intelligent & a great journalist. Above the sexist objectification of @realDonaldTrump."