US President Barack Obama has pledged to "finish the job" and end the Afghan war, addressing the US public live from a military base in Afghanistan.
Speaking a year after Osama Bin Laden's death, Mr Obama thanked US troops and hailed plans to end combat operations.
He arrived in Afghanistan on a publicly unannounced visit to sign an agreement on future Afghan-US ties with President Hamid Karzai, ahead of a Nato summit.
Hours after his speech at least six people died in a bomb blast in Kabul.
Afghan officials said at least two suicide bombers targeted a guesthouse popular with foreigners in the eastern part of the Afghan capital.
They said that most of the victims were civilians.
Two security officials later told the BBC that two to three attackers were still holed up in a building near the scene of the original attack. They have been firing from machine guns and firing RPGs.
Police have now surrounded the area.
The Taliban later claimed responsibility for the attacks.
Earlier, Mr Obama said signing the pact with President Karzai was "a historic moment" for both nations.
His visit and TV address come as correspondents say public patience with the war in Afghanistan is wearing thin.
In the speech, beamed back to prime-time evening audiences in US, the president said that at the upcoming Nato summit, to be held in Chicago, the alliance would "set a goal for Afghan forces to be in the lead for combat operations across the country next year".
Nato has already committed to withdrawing from combat operations in Afghanistan by the end of 2014.
Read more at the