Friends, family and soldiers have gathered for the funeral of an Army officer killed by a rogue member of the Afghan army on Remembrance Day.
Captain Walter Barrie was playing in a football match between British soldiers and members of the Afghan National Army (ANA) at his base in the Nad-e Ali district of Helmand province on Sunday November 11 when he was shot at close range.
The 41-year-old, from Glasgow, has been described as a "great man" by his wife, Sonia, and a "doting and amazing father" to his 15-year-old son, Callum.
Mourners gathered for the funeral at Glencorse Kirk in Penicuik, Midlothian. The service will be followed by a private burial.
Capt Barrie, of The Royal Scots Borderers, 1st Battalion The Royal Regiment of Scotland (1 Scots), had been mentoring and advising a brigade of the ANA to take over security in an area of southern Afghanistan.
He had served for 25 years, including tours of Iraq, Bosnia, Kosovo, Northern Ireland and Afghanistan in 2008. The latest tour of duty saw him deployed to Afghanistan on August 31.
His colleagues in the Army called him a "brilliant bloke" and a "soldiers' soldier". The Ministry of Defence has described him as an "approachable and compassionate officer" who cared deeply for the well-being of those around him.
The funeral is being held near Glencorse Barracks, home of 2 Scots, of which Capt Barrie was previously a member for some time. The 400-seater church was packed full for the funeral.
Among those said to be attending the service were the soldier's wife, his son, mother, Georgie Irvine, and stepfather, Robert Irvine. His brother, Alan Barrie, and sister, Donna Scott, were also thought to be among the congregation.
Mourners, wearing dark clothing or military uniform, gathered well in advance of the service. A large photograph of the uniformed soldier stood at the front of the church, as did two floral wreaths, one white and one red.