Former Rep. Mike Pompeo (R-Kan.) has been confirmed as director of the CIA by the U.S. Senate. (Joe Raedle/Getty Images)

Mike Pompeo was confirmed as CIA director by the Senate on Monday, putting the conservative Kansas congressman in charge of an agency that is bracing for its most contentious relationship with the White House in decades.

The vote was 66-32. Pompeo was sworn in Monday evening by Vice President Pence.

As CIA director, Pompeo will be responsible for managing a global spying network at a time of escalating security problems, including renewed aggression from Russia, the nuclear ambitions of North Korea and the splintering terrorism threat posed by the Islamic State.

But, at least initially, Pompeo’s most vexing task may involve finding a way to establish a functional relationship between the CIA and President Trump.

The new commander in chief traveled to CIA headquarters Saturday, in a trip that was an effort to create a fresh start with an agency he has frequently treated with contempt. Instead, what Trump delivered Saturday was a stream-of-consciousness airing of grievances, attacking Democrats and journalists.

Trump skipped most of the daily intelligence briefings offered him after his election victory. He has dismissed the agency’s conclusions on critical issues, particularly its determination that Russia interfered in last year’s election to help him win. Most recently, Trump accused intelligence officials of orchestrating a Nazi-like campaign to smear him.

[Secret CIA assessment says Russia was trying to help Trump win ]

Trump has expressed confidence in Pompeo, a businessman who served as a tank commander in the Army and graduated at the top of his class at the U.S. Military Academy at West Point.

“Intelligence agencies are vital and very, very important,” Trump said at his news conference this month. He singled out Pompeo, saying that his administration was “putting in some outstanding people.”

His comments signaled that his hostility toward the agency might subside when his designated director is in charge. But CIA veterans say that Pompeo may face more fundamental challenges, including whether he will be listened to at the White House and able to insert hard information into debates presided over by a president who has suggested he sees information on WikiLeaks as more reliable than the contents of intelligence briefs.

Michael Morell, the former deputy director of the CIA and a supporter of Hillary Clinton during the campaign, said that he has “come to admire” Pompeo after the two engaged in conversations after Pompeo was tapped for the job. Morell said he expects Pompeo to arrive at the CIA without any preconceived notions, putting off any decisions until he has had a chance to survey its work.

“Pompeo has two key challenges: winning over a workforce a bit skeptical of him . . . and making the CIA’s voice heard at the Trump White House,” Morell said. “I know Pompeo, and he will succeed at the first challenge. The second will be the defining issue of his tenure as director.”

(Bastien Inzaurralde/The Washington Post)

During his confirmation hearing, Pompeo vowed that he would defy Trump if ordered to direct the agency to resume brutal interrogation measures on terrorism suspects. He described the consensus view of U.S. spy agencies that Russia hacked the election in part to help Trump as a “sound” judgment. He also said that he would “speak truth to power” once installed in the CIA director’s office on the agency’s seventh floor.

Pompeo, 53, was a prominent member of the tea party in Congress, known for strident political views. He was a fierce critic of Clinton, a determined opponent of the Obama administration’s nuclear accord with Iran, and said at one point that he regarded the U.S. government’s conduct in the attacks on U.S. compounds in Benghazi, Libya, a political scandal that was “worse in some ways” than Watergate.

But Pompeo has spent the post-election period seeking to reassure CIA officials and members of Congress that he is prepared to put aside that partisan persona and be an honest broker as director of the CIA.

“My job,” Pompeo said during his confirmation hearing, “if confirmed, will be to change roles.”

Read more:

Trump’s pick for CIA leader says he would refuse to restart enhanced interrogation techniques

Trump’s CIA pick is seen as both a fierce partisan and serious student of national security issues

9 foreign policy issues the Trump administration will have to face