Defense secretaries always stop at American military installations on their global travels, both to speak with commanders about the mission and to extend the nation’s thanks to forward-deployed troops.

But the sensitivities of host nations sometimes make it difficult on reporters. For example, on Mr. Hagel’s previous trip to the region, in the spring, when he unveiled arms-sales deals worth almost $11 billion, the traveling press boycotted one troop visit because the gulf state said the location could not be identified — even though it routinely appears even in official Pentagon announcements.

Officials at the center said the United States and its allies still fly more than four dozen fighter or bomber missions over Afghanistan every day, all coordinated here — although the number of times they drop ordnance in support of troops on the ground is rare as the war winds down.

But interest in what is happening on the ground in Afghanistan is undiminished, and the center gathers more than 800 hours of surveillance video over the war zone every day.

In a single long workday on a trip whose purpose was essentially to shore up allies, Mr. Hagel was on the ground in Afghanistan — as well as Pakistan, Saudi Arabia and Qatar. It would be difficult to pick four partner nations in a single strategic crescent where the prize is higher — or that have more complicated relations with Washington.

In Afghanistan, Mr. Hagel made a conspicuous decision not to meet with its mercurial president, Hamid Karzai, who has refused to sign a bilateral security agreement that was unanimously approved by a council of elders that he himself convened. Mr. Hagel’s strategy seemed to be for Mr. Karzai to feel the heat from his own public, which polling shows overwhelmingly supports an enduring, if limited, allied military presence.

And in Pakistan, Mr. Hagel and Prime Minister Nawaz Sharif agreed on the dangers of terrorism, but disagreed over how to combat militants operating inside Pakistan.