President Barack Obama gestures while speaking to troops at Bagram Air Field north of Kabul, Afghanistan, during an unannounced visit, May 25, 2014.
Evan Vucci—AP
May 25, 2014 1:35 PM EDT

President Barack Obama made a surprise trip to Afghanistan on Sunday — his first visit to Afghanistan in two years and his fourth trip as President overall — and pledged a “responsible end” to the war there by the end of 2014.

During the visit, Obama spoke to troops, visited a base hospital and met with military officials to discuss troop presence in Afghanistan as the country’s longest war comes to a close. Country singer Brad Paisley flew with Obama on Air Force One to perform for the troops.

“I was in the neighborhood, thought I’d stop by,” Obama said. “I’m here on a single mission and that’s to say thank you for your extraordinary service … I’m also here representing 300 million Americans who want to say thank you as well.”

The President called it a “pivotal moment” for the war in Afghanistan, with U.S. forces preparing to end their combat role by the end of the year as Afghan forces take the lead in securing the country’s safety. “By the end of this year the transition will be complete … and our combat mission will be over,” said Obama, to some of the loudest applause of the speech. “America’s war in Afghanistan will come to a responsible end.”

He ended his remarks with a promise to shake every hand in the room. “Though I may not be able to take a selfie with everybody,” he added.

Ben Rhodes, the deputy national-security adviser for strategic communications, said the Obama Administration felt the Memorial Day weekend trip was “an opportunity for the President to thank American troops and civilians for their service.”

There are no meetings scheduled with Afghanistan’s outgoing President Hamid Karzai or either of the leading candidates in the country’s ongoing presidential election. A White House official said the Administration had invited Karzai to attend the President’s visit, but it hadn’t worked out due to the last-minute timing. “The President will likely be speaking by phone with President Karzai in the days to come, and also looks forward to working with Afghanistan’s next President after the election is complete,” said the official.

Afghanistan’s two runoff presidential candidates, Abdullah Abdullah and Ashraf Ghani Ahmadzai, have both said they would support a bilateral agreement allowing some U.S. soldiers to stay — an agreement Karzai opposes. Obama said on Sunday he was “hopeful” he would be able to sign an agreement with Afghanistan’s next President that would keep a limited military presence there after 2014.

“We want to make sure Afghanistan can never be used ever again to launch an attack against our country,” he said.

— With reporting by Zeke J. Miller

Write to Nolan Feeney at

Read More From TIME

Related Stories