Captain Walter Barrie died almost instantly at Afghan base
An inquest has heard that a Scottish soldier who was shot by a rogue member of the Afghan army on Remembrance Day last year died "almost instantly".
Capt Walter Barrie was killed at his base in the Nad-e Ali district of Helmand province on 11 November.
The 41-year-old, from Glasgow, was shot in the chest during a football match between British and Afghan forces.
The inquest at Oxford Coroners Court heard the Afghan soldier fired nine shots at Capt Barrie from an M16 rifle.
Capt Barrie served with The Royal Scots Borderers, 1st Battalion The Royal Regiment of Scotland (1 Scots).
Close range attack
At the time of his death he had been mentoring and advising a brigade of the Afghan National Army (ANA) to take over security in an area of southern Afghanistan.
Capt Barrie was playing in a match with members from the ANA and one other British soldier at his base when he was shot at close range.
The coroner's court heard that the gunman, referred to as "S" during the hearing, was dressed in full ANA uniform when he approached the pitch and fired nine shots towards Capt Barrie using an M16 rifle.
As the other soldiers fled, "S" moved towards a welfare tent for British troops and continued firing, the hearing was told.
The attack was stopped when the Afghan soldier was shot in the thigh, shoulder and head and detained by International Security Assistance Force (Isaf) soldiers.
One Afghan soldier said the gunman had spoken of concerns for the welfare of his brother on the day of the shooting spree.
Intelligence officers had warned British troops of insider attacks after a similar incident in western Afghanistan on 10 November.
The hearing was told that 60% of insider attacks are followed by another within 72 hours.
Capt Barrie, of The Royal Scots Borderers, 1st Battalion The Royal Regiment of Scotland, had served for 25 years, including tours of Iraq, Bosnia, Kosovo, Northern Ireland and Afghanistan in 2008.
A post mortem examination revealed he died from a gunshot wound to the chest.
In a statement read to the court, consultant forensic pathologist Dr Nicholas Hunt said the injury had caused "extremely rapid loss of consciousness and death".
In a statement released after Capt Barrie's death, his widow Sonia said: "Captain Walter Barrie was a great man, a doting and amazing father and a fantastic husband. He was much loved and will be missed by many."