On the day after the Republicans kicked our butts in the 2014 midterm elections—enlarging their margin in the House of Representatives and taking control of the Senate for the first time in eight years—I sat at my desk in the West Wing waiting for the bell to toll. At the time, I was the White House senior adviser for communications and strategy, and had been advising Barack Obama on media strategy and message since right before he started running for president back in 2007. I was into my third hour of looking at the devastating exit polls and turnout numbers when I got the call to come down to the Oval Office. I was pretty confident that I wasn’t being fired, but I wasn’t looking forward to this meeting, either.

We always knew that 2014 would be tough. On the flight home from Chicago the day after Obama’s re-election, in 2012, strategist David Plouffe pulled up the 2014 Senate map and declared to everyone on Air Force One that the Democrats were going to lose seats. The only question would be whether Obama could defy political gravity just enough to hold on to the majority. He didn’t. Democrats not only lost in deeply red states like Arkansas, Alaska, and Louisiana, but we also lost in states like Colorado and Iowa that had gone strongly to Obama just two years prior.

When I trudged into the Oval Office, Obama was seated at the Resolute Desk. “Pfeiffer, tough night,” he said to me as he glanced up from the briefing he was reading. Obama was always at his most hopeful after a tough loss. I never knew how much of this phenomenon derived from his eternal optimism or the obligation he felt to be the “hope” guy. Either way, his staff always appreciated it.

I sat down in the chair next to Obama’s desk, the site of many conversations over my nearly six years in the White House. “In 2008,” he said, referring to our communications strategy, “We were so far ahead of the curve. Governing is harder than campaigning, but for most of our time here, we have at least kept pace with the change. Lately, it feels like we have fallen behind.”

I had been anticipating this chat, because the president was correct. We had been on the defensive for the last 18 months. Every time we would get a little momentum, something would knock us back on our heels. Obama was referring to his White House in 2014, of course, but whether the president knew it or not, he had presciently hit on a larger problem within the Democratic Party that would help facilitate the election of Donald Trump in 2016—and one that could prevent the Democrats from winning in 2018 and 2020.

The Democratic communications advantage that the Obama campaign built in 2008, and built upon in 2012, was gone. The ground had shifted under our feet. The media environment had changed and it had changed in ways that benefited the outrage-fueled messaging of the right wing. If I had better understood how dramatic this change was, I wouldn’t have been so sure that Trump was going to lose in 2016.

In early 2011, David and I were interviewing candidates for press secretary to replace Robert Gibbs, who had decided to leave the White House. Late one afternoon, we were meeting with Jay Carney in Gibbs’s spacious office while he was on the road with the president. Jay was a well-known and well-liked former bureau chief for Time, who had left journalism to become Vice President Joe Biden’s communications director. Unlike most who make the transition from the press to politics, Jay had done it seamlessly. He was probably the sixth or seventh candidate David and I had interviewed, and we had our routine pretty much down pat. The last question we asked every candidate was: “What piece of advice would you give us to improve our communications strategy?”