(CN) - President Obama was met with a sea of U.S. and allied troops who held up phones to take pictures as he started his surprise address at Bagram Air Base in Afghanistan on Sunday. He opened simply: "How's it going, Bagram? Well, you know, it turns out that the American people, they let me use this plane called Air Force One. And so I thought I'd come over and say hello."
Obama made the stop after announcing a surprise visit to meet with Afghan President Hamid Karzai.
In his address, Obama restated that the purpose of the war in Afghanistan is to keep the Taliban from controlling the country and put Americans in danger.
"Our broad mission is clear," Obama said. "We are going to disrupt and dismantle, defeat and destroy al Qaeda and its extremist allies. That is our mission.
"And to accomplish that goal, our objectives here in Afghanistan are also clear: We're going to deny al Qaeda safe haven. We're going to reverse the Taliban's momentum. We're going to strengthen the capacity of Afghan security forces and the Afghan government so that they can begin taking responsibility and gain confidence of the Afghan people," he said.
Obama congratulated the "continuing increased capacity" of Afghan national security forces and said he wants to build a "lasting partnership" with the country.
He added that the war is crucial to American interests. "If I thought for a minute that America's vital interests were not served, were not at stake here in Afghanistan, I would order all of you home right away."
Touching on a tumultuous week in Washington and the passage of a massive U.S. health care reform bill, Obama assured the troops that partisan politics did not overshadow their service.
"I know that sometimes when you re watching TV, the politics back home may look a little messy, and people are yelling and hollering, and Democrats this and Republicans that.
"I want you to understand this: There's no daylight when it comes to support of all of you. There's no daylight when it comes to supporting our troops. That brings us together. We are all incredibly proud. We all honor what you do."
Read the Top 8
Sign up for the Top 8, a roundup of the day's top stories delivered directly to your inbox Monday through Friday.