Around 40 troops arrived back at their base at Glencorse Barracks in Penicuik early this morning (19), with the rest returning over the next few days.
The troops have been training Iraqi security forces and Kurdish Peshmerga troops to fight the pockets of Daesh, who are still in the country.
The training and mentoring operation in the Middle East is known as Operation Shader, and is the UK's contribution to defeating Daesh.
The troops from 2 SCOTS will now spend a few weeks on leave before a series of homecoming parades in Penicuik, Glasgow and Ayrshire.