KABUL 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 pact at the Afghan leader's palace that sets out a long-term U.S. 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 an unpopular war that was started by his predecessor.
"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 will say in televised remarks to the American people at 7:30 p.m. EDT (2330 GMT), according to excerpts.
"As we emerge from a decade of conflict abroad and economic crisis at home, it is time to renew America," he will say. "This time of war began in Afghanistan, and this is where it will end."
Nearly 3,000 U.S. and NATO soldiers have died during the Afghanistan war since the Taliban was ousted in 2001.
Obama visited with troops during his short stay 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.
"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 he also warned U.S. troops of further hardship ahead in Afghanistan. "The battle is not over yet," he said at Bagram airbase outside of Kabul, where only months ago thousands of Afghans rioted after U.S. troops accidentally burned copies of the Koran, the Muslim holy book.
The incident plunged relations to their lowest point in years.
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 in a statement 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.
It could help push the insurgency's leaders to re-enter reconciliation talks with both the U.S. and Afghan governments.
The agreement does not specify whether a reduced number of U.S. troops - possibly special forces - and advisers will remain behind after NATO's 2014 withdrawal deadline.
That issue will be dealt with in a separate status of forces agreement expected to take another year to conclude.
As he fights for his re-election, Obama is seeking to portray his foreign policy record as a success.
His campaign has made bin Laden's death a key part of that argument, and the president's visit to the country where militants hatched the September 11, 2001, 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 U.S.-led invasion.
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 U.S. official cautioned that no matter what pacts are signed, "Afghanistan is still going to be the third poorest country in the world with a 70 percent literacy rate and some huge sectarian schisms."
"This is still going to be tough," the official said, adding that the expectation was that the Afghan government will be able to maintain basic security.
That 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 doesn't seem to grasp the magnitude of major challenges just two years ahead of the pullout, Vygaudas Usackas told Reuters in an interview.
"The Afghans have to be in the driving seat," he said. "Probably we made them complacent."
Large parts of central Kabul surrounding Karzai's palace were locked down for the Obama's arrival, with police sealing off streets around the city's walled Green Zone, home to most embassies and NATO's Afghanistan headquarters.
Insurgents staged coordinated attacks in the same area only weeks before, paralyzing the capital's center and diplomatic area for 18 hours. The Taliban claimed responsibility for the attacks, but U.S. and Afghan officials blamed the militant Haqqani network.
After a U.S. troop surge that Obama ordered in late 2009, U.S. and NATO forces have managed to weaken Taliban militants, but the movement is far from defeated.
Obama plans to host NATO leaders in Chicago on May 20-21 for a summit to discuss the specifics of the troop withdrawals and look at ways to ensure that Afghanistan does not collapse into civil war when foreign combat forces leave.
The strategic partnership agreement could also help paper over strains in ties between Washington and Kabul which have been hurt by a number of incidents involving U.S. soldiers that have infuriated public opinion, including the massacre of 17 civilians in Kandahar and the Koran burnings.
Negotiations on the SPA were delayed for months until U.S. negotiators agreed to Karzai's demands to hand over operation of American prisons in the country to Afghan control and give leadership of night raids on homes to Afghan forces.
(Additional reporting by Mirwais Harooni, Laura MacInnis and Matt Spetalnick; Writing by Jeff Mason and Rob Taylor; Editing by Michael Georgy and Cynthia Osterman)