Kabul - US President Barack Obama arrived in Afghanistan on Tuesday to conclude an agreement charting future relations with the country, making the unannounced trip in darkness on the first anniversary of the killing of al-Qaeda leader Osama bin Laden.
Shortly after he arrived, Obama and Afghan President Hamid Karzai signed the strategic partnership pact, which sets out a future US role in Afghanistan, including aid and advisers, while trying to reassure Afghans that they will not be abandoned when most Nato combat troops leave in 2014.
Obama's plane landed with shades drawn at Bagram Airbase, north of Kabul, where only months ago thousands of Afghans rioted after US troops accidentally burned copies of the Koran, the Muslim holy book.
Obama got off the plane and then boarded a helicopter with senior aides to meet Karzai at his walled garden palace in Kabul, where they signed the Strategic Partnership Agreement (SPA) and shook hands.
"The wages of war have been great for both our nations," Obama told Karzai, adding that he looked forward to a future of peace.
Obama's trip appeared to have multiple audiences.
To US voters in an election year, he sought to signal that the US combat role in Afghanistan is drawing to a close, and to remind them of the May 2011 raid in Pakistan that killed bin Laden.
Within Afghanistan, the palace signing ceremony may be aimed at sending a message to the Taliban and other insurgent groups that they cannot wait out the 130 000 foreign troops in the country, and retake power.
It could help push the insurgency's leaders to re-enter reconciliation talks with both the US and Afghan government.
But 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 with a 70% 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.