A Royal Marine was shot dead in a gun battle in Afghanistan while saving the lives of his comrades during a special forces mission, an inquest has heard.
Cpl Seth Stephens, 42, from Dorset, died on 1 July last year.
He received a posthumous Conspicuous Gallantry Cross, second only to the Victoria Cross, for selfless bravery while in Haji Wakil in south Helmand.
He is understood to have been a member of the Special Boat Service (SBS), the naval equivalent of the SAS.
The coroner recorded a verdict that Cpl Stephens was unlawfully killed while on active service.
The hearing in Bournemouth heard that the married father of two was airlifted into the operation in the early hours by Chinook helicopter as part of an international force.
Lt Col Frederick Kemp told the inquest Cpl Stephens helped plan the operation and was "widely experienced and respected".
He said, as expected, insurgents opened fire as soon as the force arrived.
Five hours later Cpl Stephens' group was still involved in heavy fighting as it tried to clear a compound next to an orchard.
Lt Col Kemp added: "Amidst this heavy fighting, Cpl Stephens used a scaling ladder to see over the wall, which was about 9ft high, to enable him to provide covering fire to support the group in the orchard.
"In adopting this position, Cpl Stephens would have been acutely aware of his own vulnerability."
At this point a colleague was shot by an insurgent who would also have been able to see Cpl Stephens.
Comrades tried to warn him but he was found slumped at the bottom of the ladder, killed by a single gunshot wound to the back of his head, the hearing was told.
Lt Col Kemp said Cpl Stephens "was protecting and inspiring his British and Afghan comrades".
"This selfless act of bravery, which almost certainly saved the lives of his comrades, was recognised by the posthumous award of the Conspicuous Gallantry Cross."
In a statement, Cpl Stephens' widow Karen said the couple's two daughters Heather and Molly were devastated by the death of their father, which had occurred just before their 20th wedding anniversary.
She said: "Seth was courageous, selfless and ever professional. I am extremely proud of Seth and feel most privileged to have called him my husband."