Prime Minister David Cameron has made a pre-Christmas trip to Afghanistan to meet British troops serving there.
He played table football with some of the soldiers and attended a Christmas carol service.
Visiting two military bases, Camp Bastion and Camp Price, he told troops their efforts to make Afghanistan a safer place had been a "success".
But he said that British forces have paid a "high price" for what they have achieved.
There have been more than 400 deaths since troops were sent to Afghanistan in 2001 to defeat Taliban fighters.
Over the years, many British servicemen and women have been training local Afghans to protect the country for themselves.
David Cameron said the presence of UK soldiers in the country had cut the number of terrorist plots against countries like Britain and America.
On Wednesday, the Prime Minister announced that almost half the British troops still serving in Afghanistan will return home by the end of 2013.