The US President, Barack Obama, praised American troops for "important progress" against militants in Afghanistan, during an unannounced visit to an American airbase outside the capital on Friday.
A planned helicopter trip to Kabul to meet Mr Obama's Afghan counterpart Hamid Karzai was cancelled because of bad weather, and instead the two leaders spoke only briefly by telephone.
Mr Obama's second visit to Afghanistan as president came as the White House prepared to release a review of the war strategy and the day after leaked cables detailed deep US concerns about Mr Karzai's abilities and alleged widespread fraud.
The US president is under pressure to show progress in the increasingly unpopular nine-year-old war, and told nearly 4,000 troops gathered in a hangar to hear him that they were gaining ground against insurgents.
"Today we can be proud that there are fewer areas under Taliban control," Mr Obama said, in a speech filled with tributes to sacrifices of serving troops and their families back home.
"We said we were going to break the Taliban's momentum and that's what you're doing, you're going on the offense, tired of playing defense," he said to the crowd of mostly US troops.
The trip comes at a time of spiralling violence and record casualties. Altogether about 1,400 U.S. troops have died in Afghanistan since the 2001 ouster of the Taliban.
Mr Obama last year increased force levels to widen the Afghan military campaign, and many of the extra troops have been thrown into tough fighting.
A major offensive in the southern Taliban heartland of Kandahar has won some ground, but the insurgency is also spreading in previously relatively peaceful northern and western parts of Afghanistan.
White House officials emphasised the main purpose of Obama's journey was a visit with the troops around the Thanksgiving and Christmas holidays, rather than a fact-finding mission ahead of the upcoming strategic review.
"I know it's not easy for all of you to be away from home especially during the holidays and I know its hard on your families, they have got an empty seat at the dinner table," Mr Obama told the crowd, after visiting wounded soldiers.
He awarded five Purple Heart medals in the Bagram hospital.
In addition to talking to Mr Karzai, Mr Obama got briefings from key advisers, including Gen David Petraeus, the top commander of US and Nato forces in Afghanistan, and Karl Eikenberry, the US ambassador to Afghanistan.