US President Barack Obama marked the anniversary of Osama bin Laden's death with a speedy trip to Afghanistan, signing a strategic pact with Kabul on Wednesday and delivering an election-year message to Americans that the war is winding down.
Shortly after arriving under the cover of darkness, Obama and Afghan President Hamid Karzai signed a strategic partnership agreement at the Afghan leader's palace that sets out a long-term US role in Afghanistan, including aid and advisers.
The deal may provide Afghans with reassurances that they will not be abandoned when most Nato combat troops leave in 2014. For Obama, it was an opportunity to draw a line under a war started by his predecessor in response to the Sept 11, 2001 attacks, but which is now widely unpopular at home.
"My fellow Americans, we have traveled through more than a decade under the dark cloud of war. Yet here, in the pre-dawn darkness of Afghanistan, we can see the light of a new day on the horizon," Obama said in a televised address to the American people against the backdrop of armored vehicles and a US flag.
"As we emerge from a decade of conflict abroad and economic crisis at home, it's time to renew America," he said. "This time of war began in Afghanistan, and this is where it will end."
Nearly 3,000 US and Nato soldiers have died during the Afghanistan war since the Taliban rulers were ousted in 2001.
Obama visited with troops during a stay of roughly six hours in the country and emphasized bin Laden's demise, an event that his re-election campaign has touted as one of his greatest achievements in office. Obama left Afghanistan on Air Force One shortly after delivering his speech.
"Not only were we able to drive al Qaeda out of Afghanistan, but slowly and systematically we have been able to decimate the ranks of al Qaeda, and a year ago we were able to finally to bring Osama bin Laden to justice," Obama said to cheers.
But even as he asserted in his speech that there was a "clear path" to fulfilling the US mission in Afghanistan and made his strongest claim yet that the defeat of al Qaeda was "within reach," he warned of further hardship ahead.
"I recognize that many Americans are tired of war ... But we must finish the job we started in Afghanistan and end this war responsibly," he said at Bagram airbase outside of Kabul, where only months ago thousands of Afghans rioted after UStroops accidentally burned copies of the Koran, the Muslim holy book.
The incident plunged already tense relations to their lowest point in years.
While speaking in broad terms of "difficult days ahead," Obama did not address some of the thorniest challenges.
Those include corruption in Karzai's weak government, the unsteadiness of Afghan forces in the face of a resilient Taliban insurgency, and Washington's strained ties with Pakistan where US officials see selective cooperation in cracking down on militants fueling cross-border violence.
Those risks, along with the tactical gains US commanders see in parts of the country, were laid out in a new Pentagon report released on Tuesday.
Obama met Karzai at his walled garden palace in Kabul, where they signed the Strategic Partnership Agreement (SPA). "By signing this document, we close the last 10 years and open a new season of equal relations," Karzai said after the meeting.
Within Afghanistan, the palace signing ceremony was aimed at sending a message to the Taliban and other groups that they cannot wait out 130,000 foreign troops and retake power.
The agreement does not specify whether a reduced number of US troops, possibly special forces, and advisers will remain after Nato's 2014 withdrawal deadline. That will be dealt with in a separate status of forces agreement still being worked out.
As he fights for re-election in a campaign dominated by economic issues, Obama is seeking to portray his foreign policy record as a success.
His campaign team has made bin Laden's death a key part of that argument, and the president's visit to the country where militants hatched the Sept. 11 attacks on the United States reinforces that message.
It also opens him up to criticism from Republicans, who say Obama has politicized bin Laden's death.
Republican Mitt Romney, Obama's likely opponent in the November election, has criticized Obama's handling of Afghanistan, saying the timeline for a withdrawal will only embolden militants and could leave the country vulnerable to a return to power of the Taliban, which ruled Afghanistan prior to the US-led invasion.
Obama pushed back, insisting a "clear timeline" was needed to meet limited US goals in the conflict - primarily counterterrorism - and allow Afghans to assert sovereignty.
Obama's campaign has questioned whether Romney would have made the same decision to authorize the raid that killed bin Laden. On Tuesday in New York, Romney said he would have made the same call and criticized Obama for making the issue political.
Politics aside, a senior US official cautioned that no matter what pacts are signed, "Afghanistan is still going to be the third poorest country in the world."
Skepticism is shared by the European Union's ambassador to Kabul, who said earlier on Tuesday that Western aid that has been poured into Afghanistan will have a limited impact as long as governance remained poor and corruption widespread.
Afghanistan's government does not seem to grasp the magnitude of major challenges just two years ahead of the pullout, Vygaudas Usackas told Reuters in an interview.