President Barack Obama has arrived in Afghanistan on a previously unannounced visit.
Barack Obama and Afghan President Hamid Karzai have signed a 10-year accord charting future relations between the countries.
The agreement outlines the US role in Afghanistan after 2014, when most NATO combat forces are due to pull out.
Barack Obama is also due to give a TV address to Americans back home. The visit comes on the first anniversary of Osama Bin Laden’s killing.
It was a year ago that US special forces carried out a raid on Osama Bin Laden’s compound in Abbottabad, Pakistan, and killed the leader of the al-Qaeda network.
After Barack Obama’s arrival, Hamid Karzai said a post-war agreement would seal an “equal partnership” between Afghanistan and the United States, reports say.
Barack Obama added the costs of war had been great for both nations, adding he looked forward to “a future of peace”.
He acknowledged there would be difficult days ahead for Afghanistan, but said the Afghan people were taking control of their own future.
The US is to designate Afghanistan as a major non-NATO ally, US officials are quoted as saying by Reuters news agency.
Barack Obama will not make specific decisions on further reductions of US forces in Afghanistan until the autumn of 2012, the officials added.
The president is due to make his TV address from Bagram air base at 23:30 GMT.
The agreement is a first, symbolic step towards setting out a long-term relationship.
It is designed to reassure the people of Afghanistan that they are not about to be abandoned when NATO ends its operations there in 18 months.
It is also meant to send a signal to the Taliban that it cannot simply expect to take over again when the Americans leave, our correspondent adds.
This is President Barack Obama’s third trip to Afghanistan since taking office.
[youtube v6oklwFph00]