US President Barack Obama has praised American troops for decimating the al-Qaeda network and its top leadership including Osama bin Laden, but said that Afghanistan still remains a very dangerous place.
Obama, who made a four-hour long surprise visit to Bagram Air Field in Afghanistan on Sunday, said he will soon decide on possible troop levels for a post-2014 residual force to be left in the war-torn nation to train Afghan security forces.
Video: Obama to make decisions soon on Afghanistan
"I'm here on a single mission, and that is to thank you for your extraordinary service," he told US troops serving in Afghanistan, coinciding with the Memorial Day weekend.
"Everybody knows Afghanistan is still a very dangerous place. Insurgents still launch cowardly attacks against innocent civilians. But just look at the progress that you've made possible - Afghans reclaiming their communities, and more girls returning to school, dramatic improvements in public health and life expectancy and literacy.
"That's your legacy. That's what you did. Even with all the challenges, more Afghans have hope for their future. And so much of that is because of you," Obama said, as US plans to end its longest war at the end of this year.
Obama said the US has decimated the al-Qaeda leadership in the tribal regions of Afghanistan.
"Our troops here at Bagram played a central role in supporting our counter-terrorism operations - including the one that delivered justice to Osama bin Laden.So, along with our intelligence personnel, you've helped prevent attacks and save American lives back home. Al-Qaeda is on its heels in this part of the world, and that's because of you," he said.
Obama said Afghanistan has made tremendous progress in last 12 years, as he thanked American troops for making this happen.
"We know they've still got a long way to go. But for nearly a year, Afghans have been in the lead, and they're making enormous sacrifices. You look at the casualties they're taking on. They are willing to fight," he said.
Afghan forces are growing stronger. Afghans are proud to be defending their own country, he added.
"Think about the last month election. Despite all the threats from the Taliban, the Afghan people refused to be terrorized. They registered to vote. Afghan security forces secured thousands of polling places. Then millions of Afghans lined up to cast their ballot," Obama said.
"Next month's runoff will be another step toward the first democratic transfer of power in the history of this nation. That's a tribute to the courage and determination of the people of Afghanistan. But it is also a tribute to you and the sacrifices of so many Americans and our coalition partners - everything that you've done over the years," he added.