BRUSSELS — It has been a taxing week for Mark T. Esper, the acting defense secretary, who did not have that title just a few days ago.

Last Thursday, Mr. Esper, 55, was still Army secretary, sitting in the White House as officials weighed launching airstrikes against Iran. Four days later he assumed the role of Pentagon chief to fill a sudden leadership void from the departure of Patrick M. Shanahan after just four months.

And on Wednesday Mr. Esper took the stage at NATO headquarters in Brussels, wedged between what could be a looming conflict in the Middle East and convincing America’s top allies that he was the right person for the job.

Mr. Esper’s opening statement during a news briefing Thursday tried to do just that, ensuring that nothing has changed at the Pentagon — despite his seemingly overnight ascension. He implored allies to take a harder stance on Iran after a spate of incidents in the Strait of Hormuz, including the downing of an American drone by Iranian forces.