The warren of cubicles was secured behind a metal door. The name on the hallway placard had changed often over the years, most recently designating the space as part of the Mission Center for Europe and Eurasia. But internally, the office was known by its unofficial title: “Russia House.”

The unit had for decades been the center of gravity at the CIA, an agency within the agency, locked in battle with the KGB for the duration of the Cold War. The department’s prestige had waned after the Sept. 11, 2001, attacks, and it was forced at one point to surrender space to counterterrorism officers.

But Russia House later reclaimed that real estate and began rebuilding, vaulting back to relevance as Moscow reasserted itself. Here, among a maze of desks, dozens of reports officers fielded encrypted cables from abroad, and “targeters” meticulously scoured data on Russian officials, agencies, businesses and communications networks the CIA might exploit for intelligence.

In the months leading up to the 2016 election, senior Russia House officials held a series of meetings in a conference room adorned with Stalin-era posters, seeking to make sense of disconcerting reports that Moscow had mounted a covert operation to upend the U.S. presidential race.

By early August, the sense of alarm had become so acute that CIA Director John Brennan called White House Chief of Staff Denis McDonough. “I need to get in to see the president,” Brennan said, with unusual urgency in his voice.

“The Apprentice: Trump, Russia and the Subversion of American Democracy” by Greg Miller (HarperCollins)

Brennan had just spent two days sequestered in his office reviewing a small mountain of material on Russia. The conference table at the center of the dark-paneled room was stacked with dozens of binders bearing stamps of TS/SCI — for “top secret, sensitive compartmented information” — and code words corresponding to collection platforms aimed at the Kremlin.

There were piles of finished assessments, but Brennan had also ordered up what agency veterans call the “raw stuff” — unprocessed material from informants, listening devices, computer implants and other sources. Clearing his schedule, Brennan pored over all of it, his door closed, staying so late that the glow through his office windows remained visible deep into the night from the darkened driveway that winds past the headquarters building’s main entrance.

A narrative history of Russia’s interference in the 2016 election and its fallout, the book is based on hundreds of interviews with people from Trump’s inner circle, current and former government officials, individuals with close ties to the White House, members of the law enforcement and the intelligence communities, foreign officials and confidential documents. Most people interviewed spoke on the condition of anonymity to discuss classified or sensitive U.S. and foreign government deliberations.

At the time of Brennan’s request for a meeting with President Barack Obama, election anxiety about Russia was already surging. Weeks earlier, WikiLeaks had dumped nearly 20,000 emails stolen from Democratic Party computers, material from an audacious hack that authorities almost immediately traced to the Kremlin. Meanwhile, the Republican nominee, Donald Trump, was praising Russian President Vladimir Putin with inexplicable vigor and had even called on Russian spy agencies to hack his opponent.

Brennan’s review session occurred against the backdrop of these unsettling developments. But his call to the White House was driven by something else — extraordinary intelligence that had surfaced in late July and reached deep inside the Kremlin, showing that Putin was himself directing an “active measures” operation aimed not only at disrupting the U.S. presidential race but electing Trump.

Russia House was the point of origin for that assessment. Months later it became the consensus view of U.S. intelligence agencies, one of the core findings of a report released just weeks before Trump took office. It was a conclusion that would fuel investigations and infuriate the 45th president — who, on his second day as leader of the free world, was making his way to CIA headquarters.

John Brennan testifies before the Senate Intelligence Committee in 2013 during his confirmation hearings. As CIA director, his analysis of intelligence pushed him to sound the alarm on Russian interference in the 2016 election. (Melina Mara/The Washington Post)

The sting of a slur

President Trump had barely been in office 24 hours when his motorcade departed the White House grounds for the nine-mile trip to the CIA’s Northern Virginia campus. The clouds and cold that had dampened Inauguration Day lingered over a city littered with the debris of America’s post-election divide — pro-Trump memorabilia, inauguration programs and celebratory banners along the parade route; broken windows and burned vehicles on blocks where protesters had clashed with police in riot gear.

Trump’s arrival in the White House had been followed by a women’s march that drew a crowd three times larger than the inaugural audience, and now throngs of pink-clad activists watched the caravan accelerate through the D.C. streets. Their gestures toward the motorcade, countered by some salutes from Trump supporters wandering Washington, were reflected in the thick tinted glass of the president’s passing car.

The streetside crowds dissipated as the line of vehicles left downtown, crossed into Virginia, and followed the Potomac River north, turning onto the main route through the suburb of McLean and then past the zigzagging barricades that guard the entrance to the CIA.

The agency occupies a sprawling, leafy campus in Northern Virginia enclosed by miles of electrified fence. At the center of the property is a seven-story building with a row of glass doors opening onto an iconic marble lobby — with the CIA seal inlaid in the terrazzo floor — frequently depicted in movies.

Protesters demonstrate near the White House as President Trump returns from his CIA visit. (Mandel Ngan/AFP/Getty Images)

The CIA welcome for Trump would be cordial, even warm, but it was by now well known that the agency was responsible for a series of highly classified reports that had helped trigger an FBI investigation of Russia’s interference into the election and any ties to associates of the president. And Trump had made no secret of his growing belief that the CIA and FBI were engaged in a coordinated effort to damage his presidency before it had even begun.

His blistering attacks on intelligence agencies had intensified as he prepared to take office. He disparaged their conclusions about Russia’s involvement in the election and accused them of deliberately sabotaging him by leaking a document that had come to be known as the “dossier.”

That collection of memos, compiled by a former British intelligence officer, contained dozens of unproven but explosive allegations about then-candidate Trump’s ties with Russia. Among the most salacious was that he had consorted with prostitutes during a 2013 trip to Moscow for the Miss Universe pageant, paying women to defile a hotel room where Obama had once stayed.

Those assertions had gone mostly unreported in the press until U.S. intelligence officials told Trump about the dossier two weeks before he was sworn in. When its contents were published on BuzzFeed, Trump lashed out on Twitter. “Intelligence agencies should never have allowed this fake news to ‘leak’ into the public,” he said. “One last shot at me. Are we living in Nazi Germany?”

The sting of that slur was acute. The CIA’s lineage traced to World War II and the creation of a spy service whose mission was to help Allied forces defeat the same Nazis that Trump now invoked. The agency’s precursor, the Office of Strategic Services, was disbanded after the war, but a statue of its founding director, Gen. William “Wild Bill” Donovan, still stands in the agency lobby.

Trump probably knew little of that history — or for that matter of the record of CIA abuses and corresponding reforms that had transpired during the intervening decades — and would never retract the insult. Many presidents had clashed with the CIA, but the relationship had never taken such an ugly turn before a commander in chief had even taken office.

No one knew what Trump would say when he arrived at the CIA and addressed the crowd that awaited him, but one thing was certain: He would not be brought into Russia House.

A hallowed backdrop

The Trump team hoped that the CIA visit could assure the GOP establishment that Trump would settle into office and be “presidential,” which for Republicans entailed being a staunch defender of national security institutions. His aides also hoped the gesture would help avert an unnecessary rift with an agency whose unique aura and authority had proved seductive to previous presidents but was also capable of fierce bureaucratic combat — even against occupants of the Oval Office.

Secret Service agents stand in front of a memorial for former CIA director Allen Dulles on Jan. 21, 2017. (Andrew Harnik/AP)

Trump stepped out of his armored car at 2:06 p.m. in an underground parking garage and was greeted by a CIA leadership team in flux. Brennan and his deputy had resigned once Trump took office, so Meroe Park, who had served for more than three years in the No. 3 role, was officially in charge of the agency and its 20,000 employees. Park (the first woman to hold the reins as director, albeit in an acting capacity) held the job for just three days — long enough for Trump’s pick as CIA chief, Republican Rep. Mike Pompeo, to be confirmed.

Park escorted the president into the Original Headquarters building, an H-shaped structure that opened when John F. Kennedy was president. Trump was then taken by golf cart to a futuristic command post that operatives of Kennedy’s era could hardly have imagined.

The CIA’s Predator operations floor is a dazzling theater of high-tech warfare. Concentric rows of computer terminals face a wall of high-definition video screens. The ambient lighting is darkened to allow analysts to focus on footage transmitted halfway around the world from aircraft (the early Predators now largely replaced with larger, more powerful Reapers) equipped with cameras and missiles but no cockpits.

The sight of missiles streaming toward a target is particularly adrenaline-inducing to the newly initiated, and the agency often brings those it most wants to impress to the Predator display, with highlights of successful strikes cued up. Trump appeared suitably enthused, though puzzled by what he regarded as undue restraint.

When told that the CIA flew surveillance flights over Syria but that only the military conducted strikes — an Obama policy meant to return the agency’s focus to its core espionage mission — Trump made clear he wanted those restrictions wiped away and for the agency to start firing. “If you can do it in 10 days, get it done,” he said, an edict that was ultimately implemented, though it took longer than he wished.

When the agency’s head of drone operations explained how the CIA had developed special munitions to limit civilian casualties, the president seemed nonplused. Shown a strike in which the CIA delayed firing until the target was a safe distance from a compound with other occupants, Trump asked, “Why did you wait?” And when Trump noticed that militants had scattered seconds before another drone attack, he said, “Can they hear the bombs coming? We should make the bombs silent so they can’t get away.”

Agency officials had been given just several days’ notice that Trump had planned to visit the CIA and would deliver remarks; they had scrambled to make preparations that typically take weeks. An email to the workforce had offered tickets to the first 400 employees to respond, a move that helped to ensure the new president would encounter a friendly crowd since the event was being held on a weekend.

President Trump, accompanied that day by his first pick to lead the CIA, called Mike Pompeo, left, “a total star.” (Andrew Harnik/AP)

The agency expected Trump to use a teleprompter, hoping the president would work from a prepared text. But the White House sent word at the last minute to scrap the screens — Trump would speak off the cuff.

There are numerous locations at CIA headquarters suitable for a speech, among them a cavernous hallway lined with past directors’ portraits and a semi-spherical auditorium known as the Bubble.

But the risers for Trump’s visit were placed before the agency’s most hallowed backdrop: a marble wall on the north side of the main lobby marked by six rows of hand-carved stars, 117 in total at that time, each representing an agency officer or contractor killed in the line of duty. The number had grown by at least 40 since the 9/11 attacks, reflecting the toll of the wars in Iraq and Afghanistan.

The constellation had gained three new hand-chiseled stars just months before Trump’s visit, commemorating a trio of paramilitary officers killed in eastern Afghanistan in 2016. The names of many of the dead are entered in a grim ledger that rests beneath the field of stars, protected by an inch-thick plate of glass; the goatskin-bound volume also contains blank spaces for those whose identities and CIA missions remain classified.

The wall is, to the CIA, Arlington National Cemetery in miniature, a sacred space. In addition to somber memorial services when new stars are unveiled, the setting has been used for ceremonies marking momentous agency events, including the culmination of the hunt for Osama bin Laden.

It has also been a backdrop for presidents. In 2009, Obama stood before the stars for a first visit that was also uncomfortable. As a presidential candidate, he had called the CIA’s post-9/11 interrogation methods torture. Once in office, he ordered the agency’s secret prisons dismantled and directed that the legal memos used to justify their operation be made public.

Obama defended those decisions to a wary audience that he acknowledged viewed him with “understandable anxiety and concern.” But he also spoke of employees’ sacrifice and courage, describing the stars behind him — 89 at the time — as “a testament to both the men and women of the CIA who gave their lives in service to their country.” Even those who considered Obama hostile to the agency (and there were many) respected his recognition of so many lives lost.

Acting CIA director Meroe Park speaks before President Trump’s remarks. “It means a great deal that you chose to come to CIA on your first full day as president,” she told him. (Andrew Harnik/AP)

As the ceremony for Trump got underway, Park was first to the lectern, telling the new president that “hundreds more” agency employees wished to attend but were turned away for lack of space. “It means a great deal that you chose to come to CIA on your first full day as president,” she said.

Vice President Pence was next to speak, and he hit all the politically expedient notes. It was “deeply humbling,” he said, to appear before “men and women of character who have sacrificed greatly and to stand before this hallowed wall, this memorial wall, where we remember 117 who paid the ultimate sacrifice for our freedom.” He then set the table for Trump, saying he knew the new president was “going to make America safe again” and that he had “never met anyone with a greater heart for those who every day, in diverse ways, protect the people of this nation through their character and their service and their sacrifice.”

Blind to the perils

President Trump speaks on Jan. 21, 2017 — the day after his inauguration — at CIA headquarters in Langley, Va. (Olivier Doulier/Pool/Getty Images)

Trump took the stage in a striped blue tie and, though indoors, a topcoat that fell below his knees. “There is nobody that feels stronger about the intelligence community and the CIA than Donald Trump,” he said as he stood facing the bronze gaze of Donovan’s statue.

The agency would get so much support under his administration, he said, that “maybe you’re going to say, ‘Please don’t give us so much backing.’ ” He vowed to rid the world of terrorist groups and assured employees that their new director, Pompeo, was a “total star.”

The speech to that point seemed on track. Park and other agency officials appeared to exhale, gaining confidence that their fears — a confrontation, an attack on the Russia analysts, another Nazi slur — would not materialize. Then midway through his 15-minute appearance, without any pause or outward sign, Trump changed course.

Abandoning discussion of anything relevant to the agency, he set off on a riff about how youthful he felt — “30, 35, 39” — and described the size of his crowds during the final days of the campaign — 25,000, 30,000, 15,000, 19,000.

He falsely claimed to hold the record for Time magazine covers and teased that he would help build a new room at the CIA so that “your thousands of other people that have been trying to come in” would have the privilege of seeing him next time.

Trump called members of the media “the most dishonest human beings on Earth” for refusing to acknowledge the “million, million and a half people” he said had attended his inauguration the previous day — an erroneous claim off by a factor of four.

Trump directed applause to two of his closest aides, both sitting in the front row. “General Flynn is right over here. Put up your hand. What a good guy,” Trump said of his national security adviser, Michael Flynn. A retired Army general who had been one of Trump’s most vocal campaign supporters, Flynn was by then already under FBI investigation for omitting large foreign payments from his financial disclosure forms.

Within days, he would also be questioned by FBI agents over his troubling post-election contacts with the Russian ambassador to the United States.

Next to get presidential praise was Reince Priebus: “Reince. He’s like this political guy that turned out to be a superstar, right?” Trump said of his chief of staff, who was already struggling to tame the chaos of the Trump White House and was soon, like Flynn, banished.

Absorbed in self-adulation and grievance, Trump was blind to a stunning array of problems, some in plain view from the CIA stage: the failings of a national security adviser he’d insisted on hiring despite warnings; the existence of a larger agency workforce beyond this clapping, self-selected crowd that would be profoundly disturbed by his vainglorious performance; the fragments of intelligence being assembled several floors directly above him in Russia House that would help expose a web of connections between his campaign and Moscow, and feed into investigations that would threaten his presidency.

President Trump waves as Vice President Pence, in the background, gives a thumbs-up upon exiting CIA headquarters. (Mandel Ngan/AFP/Getty Images)

Trump’s ability to see these perils was impaired by his own unfamiliarity with the norms of governance, his insecurity and self-regard. Other presidents had varying levels of these traits, but none had ever possessed such a concentrated combination. These qualities had been on display from the start of his campaign. But now, against a backdrop that symbolized the profound burden of presidential responsibility, his shortcomings seemed suddenly and gravely consequential.

In the reality show that had propelled him to great fame, Trump was depicted as a business titan with peerless instincts — a consummate negotiator, a fearless dealmaker, and an unflinching evaluator of talent. Week after week, contestants competed for the chance to learn from a boardroom master — to be, as the show’s title put it, his apprentice.

In the reality that commenced with his inauguration, Trump seemed incapable of basic executive aspects of the job. His White House was consumed by dysfunction, with warring factions waiting for direction — or at least a coherent decision-making process — from the president.

His outbursts sent waves of panic through the West Wing, with aides scrambling to contain the president’s anger or divine some broader mandate from the latest 140-character blast. He made rash hiring decisions, installing Cabinet officials who seemed unfamiliar with the functions of their agencies, let alone their ethical and administrative requirements.

Decorated public servants were subjected to tirades in the Oval Office and humiliating dress-downs in public. White House documents were littered with typos and obvious mistakes. Senior aides showed up at meetings without the requisite security clearances — and sometimes stayed anyway.

Trump refused to read intelligence reports, and he grew so visibly bored during briefings that analysts took to reducing the world’s complexities to a collection of bullet points.

The supposedly accomplished mogul was the opposite of how he’d been presented on prime-time television. Now he was the one who was inexperienced, utterly unprepared, in dire need of a steadying hand. Now he was the apprentice.

The word, of course, has another connotation: an aspect of servility.

Getting to 98 percent certainty

Trump’s admiration for the leader of Russia was inexplicable and never wavered after taking office. He praised the Russian leader, congratulated him, defended him, pursued meetings with him, and fought virtually any policy or punitive measure that might displease him.

A trained intelligence operative, Putin understood the power of playing to someone’s insecurities and ego. On cue, he reciprocated with frequent praise for the president he had sought to install in the White House.

In phone conversations with Trump, Putin would whisper conspiratorially, telling the U.S. president that it wasn’t their fault that they could not consummate the relationship that each had sought. Instead, Putin sought to reinforce Trump’s belief that he was being undermined by a secret government cabal, a bureaucratic “deep state.”

“It’s not us. We get it,” Putin would tell Trump, according to White House aides. “It’s the subordinates fighting against our friendship.”

President Trump chats with Russian President Vladi­mir Putin at the Asia-Pacific Economic Cooperation summit in Vietnam on Nov. 11, 2017. (Mikhail Klimentyev/AFP/Getty Images)

It’s hard to imagine that even a master manipulator like Putin would have anticipated the full success of his operation. Not only had he sabotaged Hillary Clinton, but he had also helped install in the Oval Office someone who — by virtue of his disdain for democratic norms and volatile leadership — compounded the impact of the Russian campaign.

In the months that followed Trump’s visit to CIA headquarters, his administration would be tarred by scandals political and personal, a rate of White House dismissals unparalleled in history, and investigations into possibly illegal actions by the president, his family and his team.

Trump’s decisions sometimes seemed as if they were designed to erode American effectiveness or standing, be it in government or on the world stage. Again and again he would belittle America’s closest allies — Australia, Britain, Canada, France and Germany — all the while praising Russia’s strongman.

In so doing, Trump was extolling an authoritarian with an abysmal record on human rights. A significant number of Putin’s critics have ended up dead, most prominently Boris Nemtsov, an opposition politician who was shot multiple times as he walked near the Kremlin in 2015.

Others included Natalya Estemirova, the human rights activist who was kidnapped in Chechnya and found shot in the head; Anna Politkovskaya, the crusading journalist who was shot in her apartment building as she returned home; Sergei Yushenkov, the politician who was shot while investigating a possible government role in the bombing of an apartment building; and Alexander Litvinenko, the former security services officer who died an excruciating death in Britain when his tea was laced with polonium-210, a radioactive substance.

During his second year in office, Trump was faced with evidence that the Kremlin had carried out yet another of these attacks but resisted appeals by allies and his own aides to punish Moscow.

In March, Sergei Skripal, a former Russian military officer and agent for British intelligence, and his daughter Yulia were discovered unconscious on a park bench in Salisbury, England, after being subjected to a nerve agent developed by Soviet scientists.

When British Prime Minister Theresa May told Trump by phone that British authorities were 95 percent sure that Moscow was responsible, Trump replied, “Maybe we should get to 98 percent.”

During a weekend retreat at his Mar-a-Lago estate, Trump’s advisers persuaded him to support a plan to expel 60 suspected Russian intelligence operatives from the United States, telling him that Washington’s move would be matched in magnitude by allies in Europe.

Trump acquiesced, but his commitment unraveled on the trip back to Washington.

“Maybe we shouldn’t do this,” he said to deputy national security adviser Ricky L. Waddell during the short helicopter flight from Andrews Air Force Base to the White House on March 25.

The expulsions were set to be announced the next day in coordination with allies in Europe — an international show of resolve — and Trump was balking. Late that evening, Waddell scrambled to pull together a Situation Room meeting to confer with other top advisers on how to salvage the plan. White House Chief of Staff John F. Kelly, who called in on a secure phone line, said that he would phone Trump at his residence. “I’ll convince him,” Kelly said.

Kelly succeeded. But when the expulsions were announced, Trump erupted. He had expected France, Germany and other countries each to match the U.S. total, rather than for the cumulative response from Europe to be roughly equal to that of the United States. Trump worried that Putin would see him as the aggressor and accused aides of misleading him.

“There were curse words,” one official said, “a lot of curse words.”

A small mound of bouquets

During his speech at the CIA, hardcore Trump loyalists in the crowd stayed with him, standing throughout, cheering the taunts and boasts. But others began to shift uncomfortably, and CIA veterans who read his remarks or watched them online recoiled.

There is no shortage of braggadocio at the CIA, an agency regarded by other U.S. intelligence services as permanently afflicted with a superiority complex. But in that setting, between the flags that frame the memorial wall, the display of rampant egotism felt offensive.

One CIA veteran called Trump’s address “one of the more disconcerting speeches I’ve seen.” Another called it a “freewheeling narcissistic diatribe.” Brennan issued a statement later that day describing Trump’s appearance as a “despicable display of self-aggrandizement.” The president, Brennan said, “should be ashamed of himself.”

The hostility between Trump and the former CIA chief would escalate in the coming year. Brennan, a career public servant who never envisioned turning against a sitting president, would become increasingly outspoken, describing Trump as a threat to the country and its institutions. Trump would retaliate in 2018 by revoking Brennan’s security clearances, deepening his rift with U.S. spy agencies.

Members of Trump’s entourage thought that his appearance at the CIA had helped to avert such acrimony. The applause and ovations persuaded his handlers, including Priebus, that the president had made headway in mending his ruptured relationship with the CIA, and possibly begun to win over the agency workforce. Pompeo, according to aides, saw the dynamic in reverse: that through ovation and flattery the workforce had begun to win over the president.

After concluding his speech, Trump was whisked out of the building and back to his car for the return trip to Washington. The CIA crowd thinned as crews began stacking chairs and breaking down risers.

That week, something occurred that officials had seen only in the aftermath of a CIA tragedy. Flowers began to accumulate at the foot of the Memorial Wall on Monday, as the agency returned to work. By week’s end there was a small mound of bouquets placed by employees who passed by the stars in silence.

Subscribers can pre-order the book and save 25% + free shipping at HC.com/TheApprentice with code WASHAPPR25.