Soldiers from the Edinburgh- based 1 Scots were due to return to the UK today after completing their final tour of Afghanistan.
The Scottish battalion formally handed over its duties to 4 Rifles in a ceremony at Camp Tombstone in Helmand Province.
The base, which sits near Camp Bastion, is shared with the Afghan National Army (ANA).
The troops, who had been helping to train the ANA, are expected to fly home immediately.
The ANA will assume sole responsibility for security in Helmand once coalition combat operations come to an end next year.
Immediately after their flag was lowered in the handover ceremony, the 1 Scots insignia was removed from the parade ground as they loaded their bags on to a waiting truck.
The infantry battalion forms part of the Royal Regiment of Scotland.
Commanding officer Lt Col Ben Wrench said: “We are very pleased to be returning home after what has been a rewarding tour.
“The ANA has made huge progress since we were last here in 2010 and this is allowing us to leave Afghanistan in an orderly manner.
“Our mentoring is becoming less and less hands-on as they take the lead in planning and executing their own operations.
“What we are working on now is creating a professional army which can sustain itself.
“This means focusing on areas such as artillery, mortar and how to plan their own logistics.”
He added that he believed it was possible for the ANA to significantly disrupt the activities of the insurgency.
“I think we flatter the insurgency by describing them as an insurgency,” he said.
“They are no longer the organised and committed force that they once were.
“For many it has just become a way of life – they are motivated by income rather than ideology.”
The battalion’s insignia was carried to the Quarter Master Stores for storage after the ceremony.
Lt Col Tom Bewick, commanding officer of the incoming 4 Rifles, is on his third tour of Afghanistan.
He said the approaching fighting season, in which the ANA will take on sole responsibility for offensive operations, could see the Afghans prove they are ready to take responsibility for security in Helmand.
“My first two tours of Afghanistan, in 2009 and 2010, involved full-on fighting,” he said.
“This tour will be an opportunity to reflect on how far we have come.
“There is still work to do in professionalising the command structures of the ANA, but we shouldn’t be cynical about their ability.
“There is a lot of focus on this being the first fighting season on their own, but they have been taking on a growing role for six years.
“They are more than up to the job at this important time.”