WARNING: This story contains graphic language.
NEW YORK -- 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."
After that, "we were debating what to do" with the tape, an NBC source explained.
By Friday morning, a script had been written. The story was not slated to air on Friday night's edition of the show, however.
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 has been reporting for months on Trump's charitable donations and the Trump Foundation.
He asked NBC for comment about the tape around noon Eastern time on Friday.
The producers at "Access," which is based in California, were blindsided by Fahrenthold's call.
Contacted by CNNMoney on Friday, Farenthold declined to comment about how he obtained the tape.
But sources at NBC believe someone inside NBC downloaded the footage from one of the network's video servers. The tape was accessible internally since "Access" was working on its own story about it.
After the Post called NBC for comment, NBC News staff hurried to finish its own story.
The Post published the tape around 4 p.m. NBC News quickly followed up.
Silverstein told Page Six on Friday afternoon, "I don't know who leaked it. I have no idea."
Does "Access" have other tapes of Trump speaking in vulgar terms? One of the NBC sources said, "Not that I know of."
Reaction to the leaked video on Twitter was swift: