Video: Barack Obama in Afghanistan: we must finish the job There is going to be heartbreak and pain and difficulty ahead. But there is a light on the horizon because of the sacrifices you've made. Mr Obama and Afghan President Hamid Karzai also 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. "Today, I signed an historic agreement between the United States and Afghanistan that defines a new kind of relationship between our countries - a future in which Afghans are responsible for the security of their nation, and we build an equal partnership between two sovereign states; a future in which the war ends, and a new chapter begins," Mr Obama said. The deal may provide Afghans with reassurances that they will not be abandoned when most Nato combat troops leave in 2014. For the US President, it was an opportunity to draw a line under an unpopular war that was started by his predecessor. This time of war began in Afghanistan, and this is where it will end. With faith in each other and our eyes fixed on the future, let us finish the work at hand, and forge a just and lasting peace," he said. Nearly 3,000 U.S. and Nato soldiers have died during the Afghanistan war since the Taliban rulers were ousted in 2001.