WASHINGTON — Mike Pompeo, the current CIA director who President Donald Trump has picked to replace Rex Tillerson as secretary of state, is known for both his close ties with the president and his prior career as a hard-charging partisan in Congress.

“Tremendous energy, tremendous intellect, we’re always on the same wavelength,” Trump told reporters on Tuesday. “The relationship has been very good, and that’s what I need as secretary of state.”

As secretary of state, Pompeo will face the singularly difficult task of maintaining his relationship with Trump without alienating Democrats and allies elsewhere, reviving a State Department demoralized by a year of upheaval, and managing tense standoffs with North Korea, Iran and Russia.

Pompeo was elected to Congress from Kansas as part of the tea party wave in 2010 after a career in the Army, where he graduated from West Point and became a cavalry officer, and as a businessman. In Congress, he developed a rapport with Republicans working on intelligence and played a prominent role in the Select Committee on Benghazi, which investigated the terrorist attack there in 2012, giving him a base of support on Capitol Hill.

His resume and demeanor have served him well within the administration, observers said Tuesday, helping him build trust with a president who has a habit of injecting politics into institutions like law enforcement and intelligence that typically labor to avoid it.

“A lot of it is the tea party connection,” Michael Pillsbury, a senior fellow at the Hudson Institute, a conservative Washington think tank, who worked with Pompeo on the Trump transition team, told NBC News. “Pompeo’s own views are sympathetic with or resonate with Trump’s campaign promises in a way that Tillerson’s did not.”

At the same time, Pompeo has earned a reputation for getting along with career staff at the CIA, avoiding a problem that plagued Tillerson at the State Department, where the nation's top diplomat left numerous positions unfilled and clashed with the existing bureaucracy, presiding over a wave of exits by career foreign service officials.

“He’s viewed as is being a decent manager of the building, but also deeply ideological on certain issues,” Ilan Goldenberg, senior fellow and director of the Middle East Security Program at the Center for a New American Security, said of Pompeo.

Many of Trump’s own foreign policy views have been liable to change with the wind, but Pompeo’s ideological bent as a conservative hawk seems to fit with the president's instincts so far.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

This could be especially relevant when it comes to Iran, where Trump is threatening to exit the nuclear deal negotiated under President Barack Obama unless America’s allies and Congress add new conditions and enforcement measures. Pompeo is considered more hostile to the deal than Tillerson, which Trump singled out as a major reason for the cabinet change.

“When you look at the Iran deal, I think it's terrible. I guess [Tillerson] thought it was OK,” Trump said on Tuesday. “I wanted to either break it or do something, and he felt a little bit differently”.

Their shared political views could be a double-edged sword.

On the one hand, the State Department becomes more relevant if its secretary is considered a close confidant of the president. Trump sometimes undermined Tillerson in public, even mocking on Twitter his efforts to negotiate with North Korea.

“If people perceive you aren’t speaking for the president, like Rex, then it hurts your prestige,” said Michael Allen, a national security official under President George W. Bush who worked with Pompeo as staff director for the House Intelligence Committee. “Everyone will know if Pompeo speaks, he’s speaking for the president.”

But a reputation for political warfare and personal loyalty to the president could make Pompeo a more divisive figure, especially with Democrats, whom he may need to help confirm nominees and implement foreign policy priorities.

“If he is a total partisan, then that’s not going to be good,” Sen. Bill Nelson, D-Fla., told reporters. “The secretary of state ought to be someone who has the interests of the United States first.”

Senator Chris Murphy, D-Conn. expressed concern that Pompeo would encourage Trump's more confrontational impulses in foreign affairs.

"I know Mike, I like him, but he was not known on Capitol Hill as someone who was willing to champion American diplomacy over American military power," Murphy told NBC News on Tuesday.

So far, Pompeo has managed to distance himself from some controversial Trump stances without losing the president’s affection. Most notably, he reiterated the intelligence community’s conclusion that Russia interfered with the 2016 election, and has warned that it will likely do the same in 2018 — a stance that could calm Democrats worried about Trump's reluctance to confront Moscow over the issue.

But Pompeo has also put a more Trump-friendly spin on the situation, at one point saying Russia’s information warfare campaign ”did not affect the outcome of the election” — giving a confident opinion on a question the intelligence community had not assessed. After his remarks, the CIA itself noted that the agency's conclusions had not changed.

During the campaign, Pompeo tweeted out a link to a conservative site promoting hacked DNC emails posted by Wikileaks, which the intelligence community later identified as a conduit for Russia's election scheme. Pompeo deleted the post and later denounced Wikileaks as a "hostile intelligence service" in a speech in April last year.

“I know Pompeo to be a Russia hawk,” Allen said. “I think that because the president has confidence in him, that will help him inform the president’s views on Russia.”

Pompeo could face an immediate test on that front. British Prime Minister Theresa May has accused Russia of poisoning an ex-spy and his daughter in England with a nerve agent, but the president has been hesitant so far to accept the ally’s conclusions. Tillerson, however, told reporters on Monday that the poison attack “clearly” came from Russia and “certainly will trigger a response” from allies.

All of these issues are likely to come up in Pompeo’s confirmation hearings, where senators will likely to be eager to probe for any differences with Trump and seek assurances that Pompeo will respond to any wrongdoing by Russia.

Last time around, he demonstrated some ability to pull bipartisan support. Fourteen Senate Democrats voted to confirm Pompeo as CIA director, while one Republican, Rand Paul of Kentucky, voted “no.” The chairman of the Senate Foreign Relations Committee, Bob Corker, R-Tenn., said Tuesday he would hold hearings on Pompeo’s appointment in April.

Senate Majority Whip John Cornyn, R-Texas, told reporters he was “confident” Pompeo would be confirmed, though he warned legislators were facing a difficult schedule ahead in vetting both a new secretary of state and a new CIA director in Gina Haspel, a career intelligence official who was chosen by the president Tuesday to head the agency.

“I hold Mike Pompeo in high regard," Cornyn said, but “with everything else we have to do around here, having the prospect of two additional fights, perhaps, is going to be a challenge.”