WASHINGTON — Donald Trump’s pick for secretary of state, Rex Tillerson, said Wednesday during his Senate confirmation hearing that the United States should stand firm against Russia but could use new dialogue to ease an increasingly hostile relationship.

Tillerson, 64, the former chief executive of ExxonMobil, said the United States must honor its NATO alliance commitment to any members invaded by Russia and should have offered a muscular response to Russia’s aggressive moves in Ukraine and its annexation of Crimea.

But he also said his time in the country has convinced him that there is room for productive new dialogue.

“I think the important conversation we have to have is, ‘Does Russia want to now and forever be an adversary to the United States’,” Tillerson said. “Do you want this to get worse or does Russia desire a different relationship?”

Senators grilled the oil executive about Russia, a rising U.S. adversary where Tillerson worked extensively with the world’s largest publicly traded oil company and developed a close personal relationship with President Vladimir Putin that goes back two decades. The hearing comes after the U.S. intelligence community determined Russia interfered in the election last year and explosive — yet unsubstantiated — new allegations Tuesday night that it could possess compromising personal information about Trump.

Tillerson’s firm stance on Russia during the hearing was likely to allay some concerns on both sides of the political aisle in the Senate, which is expected to vote this month on his confirmation.

He appeared to differ with Trump on NATO as well as Crimea and Ukraine. Trump has said the United States might not come to the aid of allies who have not spent enough on defense, despite a requirement under Article 5 of the alliance with European nations.

“The Article 5 commitment is inviolable and the U.S. is going to stand behind that commitment,” Tillerson said.

The president-elect has also suggested in the past that Russia has a legitimate claim on Crimea and appeared unaware that it has troops in Ukraine to influence a civil war there.

“I think what Russian leadership would understand is a powerful response” from the United States, Tillerson said.

As the Senate Foreign Relations Committee was questioning Tillerson, Trump was dealing with Russia allegations that are threatening to consume his nascent administration.

U.S. intelligence officials briefed the president-elect on Friday about a report claiming the Russian government collaborated with his election campaign and collected compromising sexual information about him, according to multiple news sources and a leaked copy of the document published by BuzzFeed.

Trump called the bombshell a false “witch hunt” but it remained an unexpected backdrop to the confirmation of Tillerson.

“Intelligence agencies should never have allowed this fake news to ‘leak’ into the public,” Trump tweeted Wednesday morning. “One last shot at me. Are we living in Nazi Germany?”

Tillerson spent his entire career rising through the ranks of ExxonMobil and cutting deals with foreign entities such as Russia, Iran and Kurds in Iraq. In 2013, he received the Order of Friendship from Putin, which is a top award for foreigners, and he has acknowledged a relationship with Putin that began in the 1990s.

Sen. Marco Rubio, R-Fla., pressed Tillerson on whether he would support new sanctions on Russia and any countries that hack a U.S. election as well as Russia’s human rights record and associates of Putin who have died under suspicious circumstances.

“Is Vladimir Putin a war criminal?” Rubio asked.

“I would not use that term,” Tillerson said.

Sen. Ben Cardin, D-Md., the top Democrat on the Senate committee, said Tillerson must convince lawmakers that his past relations with Russia are not a problem.

“It is not too great a distance” between ExxonMobil’s profits with Russian oil partners and Putin’s “slush fund” that is being used for propaganda campaigns designed to disrupt the United States and countries in Europe, Cardin said.

But Tillerson received some support at the hearing from a widely respected former cabinet member and civilian Pentagon chief.

Former Defense Secretary Robert Gates, who served under Presidents George W. Bush and Barack Obama, said Tillerson is the right person to stop a “dangerous downward spiral” in relations with Russia. He called the Texan a “friend and fellow Eagle Scout.”

Tillerson would be able to “thread the needle” by renewing needed negotiations with the Russians on the two countries’ vast nuclear weapons arsenals while also tamping down Russia’s increasing aggressiveness around the world, said Gates, who came to know Tillerson during their shared work with the Boy Scouts of America.

The committee will weigh Tillerson’s nomination and make a recommendation to the full Senate, which must vote to approve it before Tillerson can become secretary of state.

“This to me is the most important nomination the president-elect has made … but it is going to be your responsibility to define clearly what America’s role in the world is going to be,” said Sen. Bob Corker, R-Tenn., the chairman of the committee.

Former Defense Secretary Robert Gates gives his endorsement of Rex Tillerson, whom President-elect Donald Trump selected to become the next secretary of state, during a Senate Foreign Relations Committee hearing on Capitol Hill in Washington, D.C., on Wednesday, Jan. 11, 2017. Tillerson, at right, and former Senator Sam Nunn listen in the background.CARLOS BONGIOANNI/STARS AND STRIPES