Algeria BP siege
Rescue workers carry the coffin of one of the hostages killed during a hostage crisis in a gas plant at the hospital in In Amenas

An inquest at London's Royal Courts of Justice has heard tales of astonishing bravery by six British engineers who died when the BP-owned In Amenas complex in Algeria where they worked was invaded by an Islamist group called the "Signed-in-Blood Battalion" on 16 January 2013.

The Britons - Paul Morgan and Garry Barlow from Liverpool, Carson Bilsland and Kenneth Whiteside from Scotland, Sebastian John from the East Midlands, and Stephen Green from Hampshire - were among 40 innocent workers killed when 34 men brandishing AK-47s, explosives and other weapons ambushed a convoy of workers then attacked the main complex.

So Mr Sebastian John had the presence of mind to make and send pictures of his captors, an extremely brave thing to do
- Nicholas Hilliard QC

The court heard that Mr Morgan, 46, died in the initial assault. Mr Whiteside, 59, is said to have headbutted one of the terrorists who approached him before being overpowered.

A harrowing and chaotic picture emerges of the next four days, with hostages being tied together with explosives and men being shot dead. 50-year-old Mr Barlow managed to call his wife to ask her to forward a phone number to the BBC.

Tiguentourine Gas Plant in In Amenas
A general view of damage caused by Islamist militants at In Amenas, 1600 km (994 miles) southeast of Algiers Reuters

Mr John, 26, based n Nottingham, was singled out for his bravery. On being told by Detective Superintendent James Stokley how the civil engineer had managed to get photographs of the Islamists and email them to friends and family, judge Nicholas Hilliard QC interrupted: "So Mr Sebastian John had the presence of mind to make and send pictures of his captors, an extremely brave thing to do at considerable risk to himself."

Eventually the men were placed in vehicles wired with explosives and told they were being moved but that they would be blown up if the military attacked. Later witnesses heard a loud explosion and saw the men's bodies. Most had died as a result of the explosions or gunshot wounds.

The father of Mr Green, 47, described in court the pain and grief they are still suffering.

"Stephen's death has been very hard for us," said David Green. "He had a lot of happiness to look forward to. I feel both grief and anger - grief that my son was refused a happy future and anger against those responsible. They are not forgiven or understood."

The siege was brought to an end when Algerian troops attacked the complex, killing 29 of the gang. The British government only found out when David Cameron spoke with his Algerian counterpart on 17 January.