Defense Secretary Chuck Hagel had initially planned on visiting the vast U.S. military installation here, ringed by snow-topped mountain ranges and craggy countryside, to close out the final chapter of combat missions in a bloody war that has dragged on for 13 years.
But that was months ago: before he was pressured to resign his position as Pentagon chief, before a resurgence of deadly Taliban attacks, and before his job was handed to his former deputy, Ashton Carter.
So when Hagel came here Saturday for his fourth — and most likely final — time as Defense secretary, it was not under the circumstances he had initially envisioned. His arrival in Kabul was the first leg of what's become a farewell tour through Asia and the Middle East.
Hagel resigned in November under pressure from the White House, where Obama administration officials had concluded that they needed someone who could better sell the president's escalating fight with Islamic State militants in Iraq and Syria. Though Hagel accomplished the initiatives he was brought in 18 months ago to focus on -- ending expensive ground wars, shifting military attention to China and the Asia-Pacific region and reducing the Pentagon’s $600 billion budget – he was never able to join President Obama's inner circle of national security advisors, a close-knit group whose roots date to the 2008 presidential campaign.
Hagel's trip, planned well before last month's resignation announcement, has morphed into an opportunity to meet with military commanders and heads of state for the last time, personally say goodbye to troops and reflect on his embattled tenure as the first U.S. enlisted combat veteran to serve in the office.
"There's always an emotional piece of this that you can't help but have," he said after addressing troops and taking questions from them at a military base near the eastern city of Jalalabad. "But I try not to think about that … when I stand up here and talk to these guys — that this will be my last time with them."
Not long after arriving, Hagel was at the North Atlantic Treaty Organization military base mess hall striking up a conversation with a man working at the base who years earlier had been an Army sergeant major.
When Hagel found that out, he smiled and shared a story from decades ago, when he was an unshaven, unkempt soldier in Vietnam just getting off duty and a sergeant major spotted him and scolded him for his appearance in a way he said he'd never forget.
"I listen carefully to the generals," he said jokingly. "But I fear sergeants major."
The American public hasn't seen this backslapping side of Hagel — and neither have many of his employees inside the halls of the Pentagon. It's a glimmer of the brash personality that earned him maverick status as a Republican senator from Nebraska who took controversial positions and delivered blunt assessments on issues.
But as Defense secretary, Hagel often appeared tongue-tied at congressional hearings. When called before lawmakers to explain the administration's strategy against Islamic State militants in Iraq and Syria, Hagel chose to allow Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, to take the lead on answering questions.
"He was not up to the job. I can't explain why," said Loren Thompson, military policy analyst for the Lexington Institute in Arlington, Va. "In person, he is clever and engaging. He is highly accomplished. And yet for some reason, he just couldn't tell the Pentagon's story."
Hagel, who assumed the office in February 2013, saw his job security begin to unravel when the fight against the Islamic State militants intensified. Administration officials acknowledged that the president was ready to name someone else to lead the Pentagon who could more clearly articulate his strategy.
"Whatever shortcomings he displayed were entirely predictable," said Michael E. O'Hanlon, a military analyst at the Brookings Institution. "If anything, he did slightly better than I expected, and also sustained the re-balance to the Asia-Pacific better than most others in the Cabinet or White House."
Even though Hagel is likely to leave his post shortly after the new Congress convenes in January, he's still defending administration policy. Since he stepped foot in Afghanistan over the weekend, Hagel has fended off questions from reporters on why Afghanistan will not fall into militants' hands, much as Iraq lost stability after U.S. troops withdrew in 2011.
U.S. and coalition troops plan to withdraw from Afghanistan in 2016, but in recent months, attacks intensified as the U.S. and its allies closed hundreds of bases and turned over responsibility for most combat operations to the Afghan army, which suffered its worst casualties in years.
As of Dec. 31, the U.S. military's primary job will shift from a combat force to a force that trains, advises and assists Afghan troops.
The troops will "work our way, essentially, out of a job as we transition," Hagel said — just like he will.