Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President-elect Donald Trump's pick for defense secretary made it clear Thursday that he believes Russia is no friend to the U.S., calling the country a "principal threat."

"Russia...is an adversary in key areas," James "Mad Dog" Mattis told the Senate Armed Services Committee. "I'm all for engagement, but we also have to recognize reality and what Russia is up to."

Mattis joins Trump picks who have taken a strong stance on Russia during confirmation hearings this week. Trump's choice for CIA director, Rep. Mike Pompeo, sounded similar notes during his own confirmation hearing Thursday and Secretary of State nominee, Rex Tillerson echoed those sentiments during his hearing on Wednesday.

“Deterrence is critical” to face growing threats from Russia, China, and terrorist groups, Mattis said.

Mattis, 66, also gave a shout-out of support to the CIA, FBI and other intelligence agencies that have been harshly criticized of late by the president-elect for taking a hard line against Russia.

"I have a very high degree of confidence in out intelligence community," he said.

Even before they began questioning, old friends like former Defense Secretary William Cohen praised him as a "man of thought as well as action."

"He has a nickname of Mad Dog," Cohen said. "It's a misnomer....It should be Braveheart."

Senator John McCain, the Republican chairman of the committee, agreed. "I firmly believe the nation needs James Mattis more than ever," he said.

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

Mattis, a blunt-spoken retired Marine general who led the lightning capture of Baghdad during the U.S. invasion of Iraq in 2003, got his nickname after admitting at a panel discussion two years later that he enjoyed killing the enemy.

On NATO and Nuclear Treaties

But appearing before the committee, Mattis showed some diplomatic chops as he tried to reassure senators nervous about controversial statements Trump has made about pulling back on NATO support and tearing up the Iran nuclear treaty while not alienating the president-elect.

"We are counting on you," Senator Elizabeth Warren, a Massachusetts Democrat, said after Mattis assured her he would not tailor his opinions to suit Trump.

Asked to comment on the recent controversial decision by the Obama administration to abstain from a United Nations vote condemning Israel for building Jewish settlements on Palestinian territory, Mattis chose not to wade into those turbulent waters.

"I do not have a very authoritative view of that right now," he said.

Retired U.S. Marine Corps general James Mattis prepares to testify at his confirmation hearing before the Senate Armed Services Committee on Jan. 12. Jim Lo Scalzo / EPA

Mattis also refused to be pinned down when asked by Senator Lindsey Graham, R-South Carolina, if he supports Trump’s call to move the U.S. Embassy from Tel Aviv to Jerusalem. “Right now I stick with the U.S. policy,” he said.

Mattis said he favors a permanent U.S. military presence in the Baltic states adding "I have had discussions with (Trump) on this issue. "He understands where I stand."

Gays and Women in the Military

Mattis was also pressed by New York Senator Kirsten Gillibrand, a Democrat, about speeches he has made in the past questioning the wisdom of having gays and lesbians in the ranks.

"Frankly senator, I've never cared very much about two consenting adults and who they go to bed with," he said, when asked if thinks gays in the military undermine readiness.

Mattis also told Gillibrand he has no plan to block women from combat roles. "I have no plan to oppose women in any aspect of our military," he said.

A Smoother Path to Confirmation

Mattis, who last served as commander of U.S. Central Command, needs a waiver from the law that bars recently retired military officers from leading the Pentagon. He retired in 2013, well short of the seven-year requirement.

The Senate voted Thursday 81-17 to change the law to permit Mattis to continue in the confirmation process.It will also need to pass in the House.

This has happened only once before. Gen. George Marshall, who was Army chief of staff during World War II, got a waiver in 1950 when President Harry Truman tapped him to be defense secretary.

Mattis was not questioned by any of the senators about the alleged blot on his otherwise sterling record.

A former Army Special Forces officer has accused Mattis of "leaving my men to die" after they were hit by friendly fire while fighting in Afghanistan in 2001.

Mattis has yet to comment publicly on the incident, which was detailed in the 2011 best-seller "The Only Thing Worth Dying For." But people involved in the operation told NBC News that Mattis, then a brigadier general commanding a nearby group of Marines, refused repeated requests to send helicopters to rescue the Marines.

Mattis' actions weren't formally investigated at the time.