In this 2005 image from video, Donald Trump prepares for an appearance on "Days of Our Lives" with actress Arianne Zucker (center). He is accompanied to the set by Access Hollywood host Billy Bush. (Obtained by The Washington Post)

Over the course of about an hour on Oct. 7, 2016, three things happened that reshaped that year’s presidential election and, with it, the United States.

Around 3:30 p.m., the Department of Homeland Security and the director of national intelligence issued a public warning about Russian efforts to interfere with the election, including compromising email accounts belonging to Americans. An hour later, an example of that hacking became public as WikiLeaks began dumping material stolen from Hillary Clinton’s campaign chairman, John Podesta — material stolen by Russians, according to special counsel Robert S. Mueller III.

Each of those developments was significant in its own way. But neither had the short- or long-term impact of the event that landed directly in between them: The Washington Post’s reporting on then-candidate Donald Trump’s 2005 comments during a taping for “Access Hollywood,” in which he’s heard bragging about grabbing women’s genitals.

Politico’s Tim Alberta has a new book in which we hear in detail for the first time how the campaign handled the situation as it first came to its attention. The Post’s David Fahrenthold sent questions to the campaign before the story’s publication — an email that arrived, according to an excerpt of Alberta’s book published on Wednesday, as the candidate and his team were preparing for an upcoming debate. Trump at first claimed that it didn’t sound like language he would use, a claim backed up by campaign adviser Kellyanne Conway, of all people. After hearing the audio, though, Trump and his team scrambled to figure out how to respond — or if they still had any shot at all.

It's that struggle — is Trump doomed? — that's particularly revelatory.

Reince Priebus, then the head of the Republican Party, thought he was. He spent the weekend fielding calls from furious Republicans, according to Alberta, conveying that Trump couldn’t be removed from the ticket while masking his fear that the campaign was doomed. His hope was that Trump might be compelled to drop out, telling Trump in an all-hands meeting that “[e]ither you’ll lose in the biggest landslide in history, or you can get out of the race and let somebody else run who can win.” Past reports have indicated that adviser Stephen K. Bannon was the sole voice of optimism, telling Trump that he was still a lock to win; Alberta’s reporting suggests that’s not true. (Most of those reports had Bannon as their source.)

Obviously, Trump declined to drop out. He also declined to offer much of an explanation or apology for his comments save an initial written statement (in which he accused President Bill Clinton of behaving worse) and a later videotaped statement (again raising questions about Clinton). A proposed sit-down with ABC News was scrapped.

What I remember from this period was Trump emerging from Trump Tower in New York City the morning after the tape was reported and stepping into a crowd waiting outside. He didn’t face angry chants but, instead, supportive cheers. He gave out some high-fives and went back inside. A few hours earlier he’d tweeted a rejection of the idea that he’d drop out.

He’d been planning to travel to Wisconsin for a campaign rally with then-House Speaker Paul D. Ryan (R-Wis.). After the tape came out, Ryan rescinded his invitation. At the event, though, support for Trump was obvious. As Ryan tried to wrap up his event, Trump supporters in the crowd booed and yelled “shame on you.”

Trump won the White House and, as Alberta notes, the contest for the moral center of the Republican Party.

In his book about the Trump White House, The Post’s Bob Woodward describes advice that Trump once gave a friend similarly accused of inappropriate behavior with women.

“You’ve got to deny, deny, deny and push back on these women,” Trump reportedly told his friend. “If you admit to anything and any culpability, then you’re dead. … You’ve got to be strong. You’ve got to be aggressive. You’ve got to push back hard. You’ve got to deny anything that’s said about you. Never admit.”

It was, after that first night, Trump’s political strategy. It was a plan that was antithetical to how politics is generally conducted, but it was squarely within Trump’s realm of familiarity. He’d for years operated in a surreal space where facts were contingent on his approval and felt confident that he could drive away concerns about the “Access Hollywood” tape through sheer force of will. Either he was right and voters would stick with him or Priebus and the pundits were right and his candidacy was doomed.

In January 2016, Trump had declared that he could probably shoot someone in the middle of New York City and not lose any support. The aftermath to The Post report tested that theory — and proved Trump correct.

The tape landed as Trump’s poll numbers were already slipping following the first presidential debate. Down 2.5 points on Oct. 2, according to RealClearPolitics’ average, he was down 6.7 by Oct. 13. But that turned around. As Election Day approached, independents skeptical of both candidates began to line up behind Trump. Exit polls show that 70 percent of voters found Trump’s treatment of women troubling — but 29 percent of them voted for him anyway.

There are a lot of reasons for that. Clinton had problems of her own, including that 63 percent of voters were concerned about her use of a private email server — an issue reinfected into the race about a week before Election Day by then-FBI Director James B. Comey. Only 24 percent of those who were concerned about the server voted for Clinton.

In the second debate, held right after the tape’s exposure, Trump had been asked if he’d ever acted in the way he described in the tape. Trump denied having done so. In the following days, a number of women came forward to accuse him of doing precisely that, some citing his denial as their motivation for doing so. News coverage, though, included a heavy focus on the slow trickle of emails from Podesta being released by WikiLeaks. The allegations against Trump largely got washed away.

For Trump, though, his deny, deny, deny strategy had paid off. He gambled that his supporters would stick with him and that they’d be numerous enough to carry him to victory, something Ryan saw firsthand. He bet that the pundits were wrong, despite not really having any reason to think that they would be.

As it turns out, they were. He won.

Trump learned a two-part lesson from that election. Part one was precisely that he could trust his own political instincts over the so-called experts like Priebus — without the important asterisk that his triumph over conventional thinking was something of a fluke. Part two was that demanding loyalty from his supporters and his putative political allies even in the roughest seas would result in that loyalty being delivered.

Few of the unusual moves by Trump as president can’t be traced back to one of those two theories. Both were lessons he learned clearly for the first time on Oct. 7, 2016.