A police officer walks past blood at the Imperiale Marhaba hotel after a gunman opened fire at the beachside hotel in Sousse, Tunisia June 26, 2015. REUTERS/Zoubeir Souissi

TUNIS (Reuters) - A Tunisian investigative judge has charged six security guards with failing to help tourists under attack during a 2015 massacre at a beach resort claimed by Islamic State, a counter-terrorism official said on Tuesday.

The details were revealed after a British inquiry on Tuesday found Tunisian security forces had let down the victims of the 2015 beach hotel shooting, making “deliberate and unjustifiable” delays in their journey to the scene.

One gunman killed 30 Britons and eight others at the Tunisian resort, walking nearly two miles on his killing spree before being shot dead by security forces. Islamic State claimed responsibility.

Sofian Sliti, a spokesman for judicial counter-terrorism investigations, told Reuters six security guards from the Imperial Hotel had been charged with failing to help people in danger, in a manner that caused their deaths.

All six remain free pending investigation, he said. Another 14 people have been arrested in the investigation and another 12 are also under investigation.

Concluding a six-week inquest, British Judge Nicholas Loraine-Smith criticized Tunisian security forces, saying their response had been “at best shambolic and at worst cowardly”.

An inquest by Tunisian authorities was also critical of the security forces’ response.

Tunisian officials said the gunman, a young Tunisian, had trained at jihadist camp in neighboring Libya before returning to carry out the attack. He opened fire on tourists on the beach and made his way through the hotel before he was shot outside.