“It has to be more,” he said.

Mr. Shanahan, a former Boeing executive, is stuck between President Trump’s rhetoric and the long shadow of Mr. Mattis, a retired Marine general who resigned from his position in December.

In his resignation letter, Mr. Mattis wrote of his firm belief that “our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships,” and pointed to the divide between him and Mr. Trump on that score as a reason for stepping down.

“Mattis’s departure was an earthquake,” said Jim Townsend, who served as a deputy assistant secretary of defense for European and NATO policy under former President Barack Obama. Now NATO is looking to see whether Mr. Shanahan is “going to be someone closer to the mold of Mattis or be more like what comes out of the White House.”

On Thursday, after meeting with defense ministers about the NATO training mission in Afghanistan, Mr. Shanahan said there would be “no unilateral troop reduction,” when asked by reporters about allied concerns about a rapid withdrawal.

Even before he flew to Brussels, his trip this week tested his skill in international affairs, starting with a stop in Afghanistan to meet with President Ashraf Ghani, who objects to being excluded from peace talks involving the Trump administration and the resurgent Taliban. He traveled to Iraq and met with Prime Minister Adel Abdul Mahdi, days after Iraqi politicians reacted angrily to Mr. Trump’s talk of keeping American troops in that country to “watch Iran.”

Mr. Trump has praised Mr. Shanahan, the deputy secretary under Mr. Mattis, and said that he could be running the Pentagon “for a long time.” But the president has not nominated him — or anyone else — to be defense secretary, and Mr. Shanahan has started to draw fire from some lawmakers who consider him to be out of his element.

On Tuesday, Senator James M. Inhofe, the chairman of the Armed Services Committee, said he did not think Mr. Shanahan would be nominated and that he lacked the “humility” of Mr. Mattis.