Defense Secretary Jim Mattis with deputy national security adviser Dina Powell, right, during a meeting with Saudi officials in Riyadh on Wednesday. (Jonathan Ernst/AP)

When Defense Secretary Jim Mattis sat down with leaders in Saudi Arabia last week, a top White House official traveling with him offered up a new label for the Pentagon chief, who is well known as a combat-hardened former general: “favorite of the president.”

The depiction from deputy national security adviser Dina Powell, however lighthearted, sheds light on the substantial role that Mattis has assumed since taking charge at the Pentagon three months ago, as one of President Trump’s most influential advisers and a commanding voice on foreign policy issues.

Mattis’s strong standing in Trump’s Cabinet makes the top Pentagon position more powerful than it has been in recent years, helping to steer the administration toward more traditional foreign policy positions while allocating greater authority and resources to the military at a time of complex and myriad global threats.

“You’re seeing the effects of his influence because he does have a worldview that is defined and also because of the structural differences in this administration,” which has moved decision-making power away from the White House to agencies like the Pentagon, said Richard Fontaine, president of the Center for a New American Security.

Trump’s esteem for Mattis reflects the president’s admiration for uniformed leaders and his affinity for using military action to demonstrate American power overseas.

Already, Trump has granted the Pentagon authority to expand its counterterrorism fight in Yemen, and his missile assault on a Syrian air base this month marked a political high-water mark for his turbulent presidency. On Wednesday, Mattis helped lead an unusual White House briefing for senators on the dangers posed by North Korea’s nuclear program.

Some lawmakers and security experts have raised concerns about the president’s reliance on Mattis and other current and former military leaders, including H.R. McMaster, an active-duty three-star general who serves as Trump’s national security adviser, suggesting it could militarize American interaction with the world and diminish the diversity of viewpoints represented in policy deliberations.

“Jim Mattis and H.R. McMaster given their experience understand that the military tool is not the answer for everything,” said Melissa Dalton, a senior fellow at the Center for Strategic and International Studies. “At the same time, whether they intend to or not, they are shaped by their experience.”

James Carafano, a Heritage Foundation scholar who was a member of the Trump transition team, said Trump had rapidly developed a rapport with Mattis since the two men first met after Trump’s November victory.

“How could that be that the people [Trump] really trusts when it comes to national security are totally different than his closest advisers a year ago?” Carafano asked. “It says everything about Trump, because he is someone who really respects expertise.”

The retired Marine general brings decades of military and government experience to a national security team that largely comprises Washington outsiders. As a combat leader in Afghanistan and the 1991 Persian Gulf War, Mattis worked closely with foreign militaries. As head of U.S. Central Command (Centcom) under President Barack Obama, he brandished his diplomatic credentials in his dealings with Middle Eastern leaders.

While Mattis’s hawkish proposals for pushing back against Iran eventually led to disagreements with the Obama White House and his early departure from Centcom, he now appears as an advocate for stability and restraint. His soft-spoken advocacy of continuity on a range of issues, from NATO to the alliances with Japan and South Korea, has reassured foreign leaders unnerved by the president’s impulsive statements.

Dwuan June/The Washington Post

“We’re in another context now where Mattis is the avatar of steadiness,” said one former senior official who has worked with Mattis.

In February, Japanese Prime Minister Shinzo Abe appeared to voice the relief that many foreign officials have privately expressed at Mattis’s appointment. “I was very encouraged to see someone like you could have such . . . experience both in the military as well as security, defense and the diplomacy taking this office,” he said during a visit by Mattis to Tokyo.

In a sign of the president’s favor, a White House official said that Trump considers his defense secretary “this generation’s preeminent warrior” and calls him “a modern-day Patton,” referring to World War II Gen. George S. Patton Jr.

The president also enjoys telling people that Mattis, whom Trump has gleefully referred to by the combat moniker “Mad Dog,” is undefeated on the battlefield, according to the official, who spoke on the condition of anonymity to discuss White House matters.

Trump’s enthusiasm for all things military, although he never served in uniform himself thanks to multiple Vietnam War-era deferments, has also been visible in his characterization of this month’s Syria strike or the recent decision to drop a massive bomb on Islamic State militants in Afghanistan.

Mattis has emerged as a key adviser to Trump not just on traditional military issues, but also on a range of foreign affairs. Officials said that Mattis briefs the president before each of his meetings with visiting heads of state and is considered inside the West Wing to be “the unquestioned authority on the lay of the land.”

Mattis, who officials said has forged a close partnership with Secretary of State Rex Tillerson, has at times pushed back gently against Trump’s views, managing to put forward alternate positions without explicitly challenging his boss.

Although it’s impossible to know the extent to which Mattis has shaped Trump’s evolving views on Russia, NATO and other issues, the president has spoken repeatedly of his trust in the Pentagon chief and, even before he took office, voiced his willingness to defer to Mattis’s rejection of torture in the interrogation of terrorism suspects.

“I don’t know what happened in Trump’s head, but so far it looks like it’s been resolved in the direction of the ideas that Mattis has laid out,” Fontaine said.

Dwuan June/The Washington Post

Officials said that Mattis’s succinct communication style has contributed to his traction with a commander in chief known to prefer short, visual briefings.

“He’s someone who really, really understands a topic and can boil it down,” said the White House official. “Mattis gets the way the president operates, the way he likes to consume information.”

Mattis regularly joins Trump for dinner in the White House residence, sometimes more than one evening a week, officials said, at times accompanied by other senior officials such as Gen. Joseph F. Dunford Jr., chairman of Joint Chiefs of Staff, or Homeland Security Secretary John F. Kelly, who like Mattis is a retired general.

The regular after-hours gatherings, focused on the discussion of pressing national security matters, are a contrast to Obama’s more distant ties with his uniformed leaders.

They are also an indication of the free-flowing style that has characterized the administration’s deliberations on national security.

That approach has sometimes generated confusion, as it did after one such dinner in late January in which Trump approved new military actions in Yemen. The decision made outside the National Security Council process, including a tiny cohort of top officials and leaving only a light paper trail, produced weeks of uncertainty among military officials.

While Trump’s break with the Obama administration’s tight control of military issues has delighted defense officials, the shift could prove to be risky for Mattis if something serious goes wrong.

Already, a series of incidents have exposed an apparent disconnect between the Pentagon leadership and senior commanders. In one recent example, confusion arose over whether an aircraft carrier, the USS Carl Vinson, was heading toward the Korean Peninsula. On April 11, Mattis said the Carl Vinson was “on her way up there,” but Navy photos showed the carrier heading in the opposite direction days later.

So far at least, Trump does not appear to have been bothered by those incidents. Unlike the last administration, when Obama overruled recommendations from Cabinet members to launch military action in places including Syria, “in this case you may have a secretary of defense who’s inclined to use force and also a president who’s inclined to listen,” the former official said.

For Mattis, the accolades could carry their own risk. Trump has shown himself willing to push back against aides who are publicly depicted as exerting significant influence over him, as he did against adviser Stephen K. Bannon.

Perhaps aware of that dynamic, Mattis’s brow furrowed noticeably when Powell made her remark in Riyadh last week.

Ashley Parker contributed to this report.