- Cameron and Karzai sign an agreement on the long-term future of Afghanistan
- Cameron says Britain will still have combat troops in Afghanistan into 2014
- Britain is the second largest contributor of troops to NATO's forces there after the U.S.
- President Nicolas Sarkozy has said France will withdraw its troops a year earlier than planned
Afghan President Hamid Karzai and Prime Minister David Cameron pledged to work toward lasting stability in Afghanistan in talks Saturday in the United Kingdom.
The pair signed a long-term agreement on the future of Afghanistan, as they met at Cameron's official country residence, Chequers.
"The United Kingdom and Afghanistan have a strong relationship and the two countries have been working together to create a strong and stable Afghanistan," Cameron said.
Cameron said British combat forces would remain in Afghanistan well into 2014, when NATO's International Security and Assistance Force, or ISAF, is due to hand over security to Afghan forces and withdraw.
Britain has about 9,500 troops in Afghanistan, making it the second-biggest contributor to ISAF after the United States, which has about 90,000 troops there.
Cameron said the NATO partners in Afghanistan would be working together to withdraw their troops in 2014 as planned.
"I don't want to see some cliff edge on our departure," he said.
Karzai said the British prime minister had long been a friend of Afghanistan, adding: "Based on that long-term relationship, we hope to provide a fundamentally strong, democratic state and a better, more secure region."
Karzai's U.K. visit comes a day after a British soldier was shot dead while on foot patrol in Afghanistan's Helmand province and follows stops in Italy and France.
After meeting with Karzai in Paris Friday, French President Nicolas Sarkozy announced that France would be pulling all of its combat troops out of Afghanistan in 2013, a year ahead of schedule.
His decision follows the death on January 20 of four French soldiers shot dead at their military base by a member of the Afghan National Army.
Sarkozy, who faces a re-election battle this spring, said then he was suspending French training operations and combat help as a result of the attack, which injured 15 others.
He paid tribute to the four soldiers at a memorial service Wednesday, speaking of the "immense loss" the country had suffered.
The attack in eastern Afghanistan followed a similar shooting in December by an Afghan soldier that killed two French soldiers serving in an engineers' regiment.
Speaking alongside Sarkozy in Paris, Karzai said: "It is right that Afghanistan has to provide for its own security and for the protection of its own people, and for the provision of law and order -- towards which France and other allied countries have helped Afghanistan considerably in the past 10 years.
"Afghanistan because of that help is now ready to take more and more responsibility."
U.S. State Department spokeswoman Victoria Nuland said Friday that France's decision to withdraw its forces early "was not precipitous" and had been worked through with its ISAF partners and the Afghan authorities.
"This was a national decision of France. It was done in a managed way. We will all work with it. As the president has said with regard to our own presence, we are working on 2014. The alliance as a whole is working on 2014, but we are also going to work within this French decision," she told reporters.
France, which has been involved in Afghanistan since July 2003, has 3,935 troops there now, according to ISAF.